mscripts/scripts/sendMessage.scpt
Maciej Krok 940559a71d send imesage via cli
osascript sendMessage.scpt ${phonenumber} "message from cli"
2018-12-24 23:50:58 +01:00

8 lines
250 B
AppleScript

on run {targetBuddyPhone, targetMessage}
tell application "Messages"
set targetService to 1st service whose service type = iMessage
set targetBuddy to buddy targetBuddyPhone of targetService
send targetMessage to targetBuddy
end tell
end run