send imesage via cli

osascript sendMessage.scpt ${phonenumber} "message from cli"
This commit is contained in:
Maciej Krok 2018-12-24 23:50:58 +01:00
parent f079e44f98
commit 940559a71d

7
scripts/sendMessage.scpt Normal file
View File

@ -0,0 +1,7 @@
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