I recently threw together a simple and rough script that can be used to send many messages to a friend in rapid succession on a mac:
MESSAGE=$1
TIMES=$2
BUDDY=$3
echo "$MESSAGE"
for ((i=0; i < $TIMES; i++))
do
osascript -e 'tell application "Messages" to send '"${MESSAGE}"' to buddy "'${BUDDY}'"'
done
just make sure to put the above in an executable file, and you can pass the arguments as such:
./FILENAME.sh '"uh oh, something might be broken"' 1000 1234567890
This will send the message “uh oh, something might be broken” to the phone number 123-456-7890* one thousand times in
rapid succession.
*phone number might need to be a contact
Remember to be responsible! Don’t abuse automation tools or you might end up being blocked or banned.
Applescript is really cool, too!. You can automate a lot of things on a mac using it like responding to messages, creating reminders, etc. Definitely worth tinkering with if you have any interest.