Skip to content

Instantly share code, notes, and snippets.

@jononon
Created November 25, 2015 18:13
Show Gist options
  • Save jononon/26acb1a57ebe4f573f40 to your computer and use it in GitHub Desktop.
Save jononon/26acb1a57ebe4f573f40 to your computer and use it in GitHub Desktop.
repeat
-- Get the "hour"
set timeStr to time string of (current date)
set Pos to offset of ":" in timeStr
set theHour to characters 1 thru (Pos - 1) of timeStr as string
set timeStr to characters (Pos + 1) through end of timeStr as string
-- Get the "minute"
set Pos to offset of ":" in timeStr
set theMin to characters 1 thru (Pos - 1) of timeStr as string
set timeStr to characters (Pos + 1) through end of timeStr as string
log theMin
if theMin is "00" or theMin is "30" then
tell application "Messages"
set targetService to 1st service whose service type = iMessage
send "Take Photos of Robot" to buddy "+18182354277" of targetService
end tell
tell application "Messages"
set targetService to 1st service whose service type = iMessage
send "Take Photos of Robot" to buddy "+12133699940" of targetService
end tell
end if
delay 60
end repeat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment