Skip to content

Instantly share code, notes, and snippets.

@eko
Last active February 25, 2022 02:09
Show Gist options
  • Save eko/91220688b7bbabe3a1c9 to your computer and use it in GitHub Desktop.
Save eko/91220688b7bbabe3a1c9 to your computer and use it in GitHub Desktop.
AppleScript send a SMS to a list of your contacts
tell application "Messages"
set targetService to id of 1st service whose service type = iMessage
set peopleICareAbout to {"Vincent Composieux"}
set peopleAlreadySent to {}
repeat with myBuddy in buddies
set buddyFullname to full name of myBuddy
set buddyFirstname to first name of myBuddy
if buddyFullname is in peopleICareAbout and buddyFullname is not in peopleAlreadySent then
copy buddyFullname to end of peopleAlreadySent
send "Hi!" to buddy buddyFullname of service id targetService
end if
end repeat
end tell
@bhishanpdl
Copy link

contacts.applescript:194:201: execution error: The variable buddies is not defined. (-2753)

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