Skip to content

Instantly share code, notes, and snippets.

@adonaldson
Created November 8, 2011 22:41
Show Gist options
  • Save adonaldson/1349539 to your computer and use it in GitHub Desktop.
Save adonaldson/1349539 to your computer and use it in GitHub Desktop.
Linkinus script to set iChat as away when off to play Quake. How very '98!
on linkinuscmd(ipAddress)
set AppleScript's text item delimiters to ""
set iChatActive to false
set theString to "/me is not currently running iChat"
tell application "Finder"
if (get name of every process) contains "iChat" then set iChatActive to true
end tell
if iChatActive then
tell application "iChat"
if (length of ipAddress is 0) then
set status to available
set status message to ""
set theString to ""
else
set status to away
set status message to "QW: " & ipAddress
set theString to "/me is off to play QW (" & ipAddress & ")"
end if
end tell
end if
return theString
end linkinuscmd
linkinuscmd("")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment