Skip to content

Instantly share code, notes, and snippets.

@ghandic
Created June 18, 2018 16:40
Show Gist options
  • Save ghandic/c212e858cacb8b1546f925cdd811315b to your computer and use it in GitHub Desktop.
Save ghandic/c212e858cacb8b1546f925cdd811315b to your computer and use it in GitHub Desktop.
Send an automated iMessage
targetBuddyPhone='+44765979706'
targetMessage='This is a automated message'
osascript <<EOF
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
EOF
@ghandic
Copy link
Author

ghandic commented Jun 18, 2018

^Apologies for whoever's this number is I made it up

@kid-cloud
Copy link

how can I use this for pranks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment