1

Tried adding an AppleScript to run a specific command when I'm sending or receiving a message in Messages on my server, but for some reason it never seems to get called.

Placed it first in ~/Library/Scripts/Applications/Messages, and then in ~/Library/Application Scripts/Messages, but it doesn't seem to work in either. It appears at the bottom of the AppleScript menu when I have Messages front though.

Here's the test script:

using terms from application "Messages"
    on message sent theMessage for theChat
        display dialog "Triggered on message sent"
    end message sent
    on message received theMessage from theBuddy for theChat
        display dialog "Triggered on message received"
    end message received
end using terms from

Any idea why neither of these fire?

1
+100

I believe that the Applescripts need to be called in Preferences > Alerts. Select an event and then select "Run an Applescript Script:"

See if that helps.

  • That worked perfectly! So is this how it always worked with Messages (that it didn't trigger these scripts by default), or did something change with Mountain Lion? – Christian A. Strømmen Jul 14 '13 at 17:06
  • As far as I can recall it has always worked this way, but I can't recall very far. – Tortilla Jul 14 '13 at 19:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .