IM/IRC/Skype Statuses Applescript Helper

Largely inspired by Beau’s equivalent setup, I rolled out a small Applescript to set my miscellaneous IM/IRC/Skype statues as away or available in one click.

set myStatus to display dialog "Select your IM Status:" buttons {"Away", "Available"} default button 1

-- Adium: Multiple IM and single IRC account statuses
if appIsRunning("Adium") then
	tell application "Adium"
		if the button returned of myStatus is "Away" then
			send the first chat of the first chat window message "/nick stephdau|away"
			go away
		else
			send the first chat of the first chat window message "/nick stephdau"
			go available
		end if
	end tell
end if

-- Skype status
if appIsRunning("Skype") then
	tell application "Skype"
		if the button returned of myStatus is "Away" then
			send command "SET USERSTATUS AWAY" script name "My Script"
		else
			send command "SET USERSTATUS ONLINE" script name "My Script"
		end if
	end tell
end if

-- iTunes
if appIsRunning("iTunes") then
	tell application "iTunes"
		if the button returned of myStatus is "Away" then
			pause
		else
			play
		end if
	end tell
end if

-- Helper
on appIsRunning(appName)
	tell application "System Events" to (name of processes) contains appName
end appIsRunning

Note on Adium handling: because of my account order and the fact that I connect to IRC via ZNC, the first chat of the first chat window is always an IRC room in my context.

I haven’t yet, but I could adapt this script to also take parameters to get the button status equivalent, then couple it with SleepWatcher or ScriptSaver to have the script triggered on sleep/wake on my MacBook Pro or when the screensaver activates/deactivates on my iMac.

WordPress 3.1 Beta 1

It’s that time in the release cycle again, when all the features are basically done, and we’re just squashing bugs. To the brave of heart and giving of soul: Won’t you help us test the new version of WordPress? As always, this is software still in development and we don’t recommend that you run it on your normal live site — set up a test site just to play with the new version. If you break it (find a bug), report it, and if you’re a developer, try to help us fix it. (Especially you U.S. types who are taking a long weekend for Thanksgiving! )

via WordPress › WordPress 3.1 Beta 1.

We’ve been running it on WordPress.com for a while, so it’s solid, but YMMV.