Skip to content

Instantly share code, notes, and snippets.

@LeiHao0
Last active May 24, 2016 06:38
Show Gist options
  • Select an option

  • Save LeiHao0/c155b854166dac81a099579b6c2daf45 to your computer and use it in GitHub Desktop.

Select an option

Save LeiHao0/c155b854166dac81a099579b6c2daf45 to your computer and use it in GitHub Desktop.
sendMessage.applescript
crontab -e
0-59 0-23 1-31 1-12 0-7 osascript /Users/Art/Desktop/sendMessage.applescript $PhoneNumber "Text Message"
on run {targetBuddyPhone, targetMessage}
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
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment