Created
November 25, 2015 18:13
-
-
Save jononon/26acb1a57ebe4f573f40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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