3

I am trying to do a little hack with the Messages application on OSX Mountain Lion. I am using applescript, but everything I have tried has not been working out for me..

Here is what I tried first

using terms from application "Messages"
   on message sent theObject
        display "it worked!"
   end message sent
end using terms from

But when I press run it just seems to just exit to program immediately. How do I make it stay in listener loop?

1 Answer 1

3

I found out the answer to this question... which I believe is completely unintuitive. Basically, first you move the script to ~/Library/Scripts/Messages, then in Messages create an alarm for the event and have the event call the script.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.