Skip to content

Instantly share code, notes, and snippets.

@ckalegi
Last active July 2, 2018 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ckalegi/1fa2c91489e564e2552196dbcee4917d to your computer and use it in GitHub Desktop.
Save ckalegi/1fa2c91489e564e2552196dbcee4917d to your computer and use it in GitHub Desktop.
Send the same iMessage N times to X recipient
on run
set promptTargetPhone to display dialog "Enter the iMessage phone number or email of target recipient" default answer ""
set targetPhone to text returned of promptTargetPhone
set promptTargetMessage to display dialog "Enter the message to send" default answer ""
set targetMessage to text returned of promptTargetMessage
set promptSendCount to display dialog "How many times should it send?" default answer ""
set sendCount to text returned of promptSendCount
repeat sendCount times
tell application "Messages"
set targetService to 1st service whose service type = iMessage
set targetBuddy to buddy targetPhone of targetService
send targetMessage to targetBuddy
end tell
end repeat
end run
@ckalegi
Copy link
Author

ckalegi commented Jul 2, 2018

Open Script Editor.app > copypasta > hit play
Dialogue 1 tested with formats:

Messages are sent from your number.

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