I am trying to create a service that grabs the URL of some link, then create a blank iMessage with that URL in the body. Basically, I want to recreate that Message share feature in Safari in Mountain Lion, but with Reeder.app, specifically. "Copy Link" from the context menu doesn't always work, esp. when sending to a iphone, the URL drops, and all you get is the alias.

I've set up an Automator with Applescript, and I can definitely send a message to a buddy, if those things are specified. I'd prefer to populate that in iMessage, since I won't always be sending to the same person.

Below works, using set input as a proxy for automator's url grabbing at the moment.

set input to "http://aol.com"
tell application "Messages"
          set theBuddy to buddy "[email protected]" of service "iCloud"
          send input to theBuddy
end tell

Also tried

tell application "Messages"
    set theBuddy to buddy "*" of service "iCloud"
    set input to invitation message of text chat of service "iCloud"
end tell

Both from https://discussions.apple.com/thread/3923965?start=0&tstart=0

  • Interestingly, in a workaround, using the two buddies will almost always use with 'send input to "[email protected]"', i get a working service. it is available in Safari for a URL, but it is not available in Reeder.app as a service for anything. It doesn't show in the context menu, it doesn't show up in Reeder > Services. Odd. Is this a Reeder issue? I noticed that my service is in "Internet" category in Services Manager...I would still rather have a blank iMessage with a URL in the text, so that I can amend if I want.
    – greenwar
    Commented Sep 3, 2012 at 9:19

1 Answer 1


You have to do it with UI scripting :

tell application "System Events" to tell process "Messages"
    set input to "http://aol.com" as text
    click button 1 of group 1 of splitter group 1 of window 1
    delay 1
    keystroke "[email protected]" -- type the reciever
    keystroke return -- validate the previous input
    keystroke tab -- move to message input
    keystroke input -- type the message
end tell

You must log in to answer this question.

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