Created
February 7, 2012 10:12
-
-
Save danieroux/1758934 to your computer and use it in GitHub Desktop.
AppleScript scripts to use with http://pomodoro.ugolandini.com (also see http://pomodoro.ugolandini.com/pages/pomoscripts.html)
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
tell application "System Events" to if exists process "Adium" then | |
tell application "Adium" | |
set account_list to every account | |
repeat with acc in account_list | |
set stat to status of acc | |
set status type of acc to available | |
set status message of acc to "Available." | |
set autoreply of stat to no | |
end repeat | |
end tell | |
end if | |
tell application "System Events" to if exists process "ichat" then | |
tell application "iChat" | |
set status to available | |
set status message to "Available." | |
end tell | |
end if | |
tell application "System Events" to if exists process "Skype" then | |
tell application "Skype" | |
send command "SET USERSTATUS ONLINE" script name "My Script" | |
end tell | |
end if | |
tell application "System Events" to if exists process "Mail" then | |
tell application "Mail" | |
set account_list to every account | |
repeat with acc in account_list | |
set include when getting new mail of acc to true | |
end repeat | |
check for new mail | |
end tell | |
end if |
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
tell application "System Events" to if exists process "Adium" then | |
tell application "Adium" | |
set account_list to every account | |
repeat with acc in account_list | |
set stat to status of acc | |
set status type of acc to away | |
set status message of acc to "I will be available in | |
$duration minutes." | |
set autoreply of stat to yes | |
end repeat | |
end tell | |
end if | |
tell application "System Events" to if exists process "ichat" then | |
tell application "iChat" | |
set status to busy | |
set status message to "I will be available in $duration minutes." | |
end tell | |
end if | |
tell application "System Events" to if exists process "Skype" then | |
tell application "Skype" | |
send command "SET USERSTATUS DND" script name "My Script" | |
end tell | |
end if | |
tell application "System Events" to if exists process "Mail" then | |
tell application "Mail" | |
set account_list to every account | |
repeat with acc in account_list | |
set include when getting new mail of acc to false | |
end repeat | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment