Skip to content

Instantly share code, notes, and snippets.

@homebysix homebysix/
Last active Jul 31, 2016

What would you like to do?
MESSAGE="Hello world"
cat << EOF > /tmp/send_imessage.scpt
tell application "Messages"
set serviceID to get id of first service
set theRecipient to buddy "${RECIPIENT}" of service id serviceID
send "${MESSAGE}" to theRecipient
end tell
osascript /tmp/send_imessage.scpt
rm -f /tmp/send_imessage.scpt
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.