Created
May 15, 2019 19:40
-
-
Save BetterProgramming/8eddd721c249505c657eb8592028ee9a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # sendMessage.scpt | |
| on run {targetPhoneNumber, targetMessageToSend} | |
| tell application "Messages" | |
| set targetService to 1st service whose service type = iMessage | |
| set targetBuddy to buddy targetPhoneNumber of targetService | |
| set targetMessage to targetMessageToSend | |
| send targetMessage to targetBuddy | |
| end tell | |
| end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment