Skip to content

Instantly share code, notes, and snippets.

Created June 30, 2011 21:17
Show Gist options
  • Save anonymous/1057259 to your computer and use it in GitHub Desktop.
Save anonymous/1057259 to your computer and use it in GitHub Desktop.
tell application "Skype"
set timeStr to time string of ((current date) + (25 * minutes))
set pos to offset of ":" in timeStr
set timeStr to (characters 1 thru (pos + 2) of timeStr as string) & characters (pos + 6) thru end of timeStr as string
set myMood to "SET PROFILE MOOD_TEXT Pomodoro in progress, available at " & timeStr
set status to "SET USERSTATUS DND"
send command myMood script name "AppleScript"
send command status script name "AppleScript"
end tell
if appIsRunning("Mail") then
tell application "Mail"
quit
end tell
end if
if appIsRunning("Tweetie") then
tell application "Tweetie"
quit
end tell
end if
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment