Created
June 18, 2018 16:40
-
-
Save ghandic/c212e858cacb8b1546f925cdd811315b to your computer and use it in GitHub Desktop.
Send an automated iMessage
This file contains 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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how can I use this for pranks.