Last active
August 29, 2015 14:04
-
-
Save flatanimals/a640503139a8e268dd15 to your computer and use it in GitHub Desktop.
Red October Mode for Apple Messages
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
-- Red October Mode for Apple Messages | |
-- | |
-- Fun away mode message with crazy ivans every 15 minute to make sure someone isn't following you | |
-- | |
-- USE: save as an "Application" with the "Stay open after run handler" option checked | |
-- | |
property resetmessage : 1 as integer | |
property previousturn : 0 as integer | |
on idle | |
if resetmessage is equal to 1 then | |
tell application "Messages" | |
set status to away | |
set status message to "Red October" | |
end tell | |
display notification with title "Red October Mode" subtitle "Running silent and deep, Sir" | |
set resetmessage to 0 | |
end if | |
if the (minutes of the (current date)) mod 15 is equal to 0 then | |
if previousturn is equal to 0 then | |
set previousturn to 1 | |
tell application "Messages" | |
set status message to "CRAZY IVAN STARBOARD!!!" | |
end tell | |
else | |
set previousturn to 0 | |
tell application "Messages" | |
set status message to "CRAZY IVAN PORT!!!" | |
end tell | |
end if | |
set resetmessage to 1 | |
display notification "It appears no one is following us, Sir" with title "Red October Mode" subtitle "Crazy Ivan Successful" | |
end if | |
-- execute every 60 seconds | |
return 60 | |
end idle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment