0

I need to be able to send iMessages with apple script when that contact or "buddy" is not in the main iMessage Application yet. I am able to send them no problem if the thread is already created and has messages in it. But if i try to send it to one that is not the script will either fail or do nothing.

tell application "Messages"

    set myid to get id of first service

    set theBuddy to buddy "example@email.com" of service id myid

    send "Hi there" to theBuddy

end tell

Here is an example of the script I currently use to send a message, but as stated above this does NOT work if there isn't already a message thread, any idea how to do this? I'd rather not use UI callbacks.

kyle hoell
  • 117
  • 2
  • 13
  • https://stackoverflow.com/a/39548456/953553 – andilabs Oct 09 '19 at 21:57
  • Possible duplicate of [How to start new conversation in iMessage using AppleScript?](https://stackoverflow.com/questions/39027839/how-to-start-new-conversation-in-imessage-using-applescript) – andilabs Oct 09 '19 at 21:58

0 Answers0