Instantly share code, notes, and snippets.

anonymous /gist:1057259
Created Jun 30, 2011

Embed
What would you like to do?
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