1

I am trying to send NEW messages using applescript through the macos messages app.

on run {targetBuddyPhone, targetMessage}
    tell application "Messages"
        send targetMessage to buddy targetBuddyPhone of service "SMS"
    end tell
end run

The above script runs fine on the condition that there is already a conversation started for the specific targetBuddyPhone in the messages app. Any ideas how to send a NEW message?.. I can't believe it isn't possible.

jon
  • 1,429
  • 1
  • 23
  • 40

1 Answers1

2

It could be possible to call URL from Apple Script in this form:

sms://open?addresses=+15558675309,+15558675301/&body=Text%20Here%20end!

It will not send message, but just prefill it and user will need to press Enter key.

Bobík
  • 1,828
  • 20
  • 19