Skip to content

Instantly share code, notes, and snippets.

Created June 30, 2011 21:17
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
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