Automatically change the status in iChat
Here is a way to automatically change your status when sending or receiving text, audio/video invitations. You’ll need to create five simple AppleScripts, and save them into your user’s Library » Scripts » iChat folder (create the folder if necessary).
Open Script Editor (in Applications » AppleScript), then copy and paste these scripts, one at a time, into the Script Editor window. Click the Compile button, then select File » Save As and point to the previously-noted iChat folder. Name them as shown with each scripts code, on the second page of the hint…
Script name: iChat invited text.scpt
using terms from application “iChat”
on received text invitation theText from theBuddy for theChat
accept theChat
set savedstatus to status – save actual status
set savedstatusmsg to status message – save actual status message
set status to away
set firstname to (get first name of theBuddy)
set lastname to (get last name of theBuddy)
set status message to “Currently text chatting” & ” with “ & firstname & ” “ & lastname
set message_status to status message
say message_status
if (savedstatusmsg contains “Chat”) or (savedstatusmsg contains “Conversation”) then
delay 10 – display only for a few seconds
set status to savedstatus – restore the original status before the invitation
set status message to savedstatusmsg – restore the original message before the invitation
end if
end received text invitation
end using terms from
Script name: iChat invited video.scpt
using terms from application “iChat”
on received video invitation theText from theBuddy for theChat
set status to away
set firstname to (get first name of theBuddy)
set lastname to (get last name of theBuddy)
set status message to “Video Chat” & ” with “ & firstname & ” “ & lastname
set message_status to “Video Chat” & ” with “ & firstname & ” “ & lastname
– say message_status
end received video invitation
end using terms from
Script name: iChat invited audio.scpt
using terms from application “iChat”
on received audio invitation theText from theBuddy for theChat
set status to away
set firstname to (get first name of theBuddy)
set lastname to (get last name of theBuddy)
set status message to “Audio Chat” & ” with “ & firstname & ” “ & lastname
set message_status to “Audio Chat” & ” with “ & firstname & ” “ & lastname
– say message_status
end received audio invitation
end using terms from
Script name: iChat started.scpt
using terms from application “iChat”
on av chat started
tell application “iChat”
set windowname to (get name of window 1)
if (windowname does not contain “Chat”) and (windowname does not contain “Conversation”) then
set windowname to (get name of window 2)
end if
if (windowname does not contain “Chat”) and (windowname does not contain “Conversation”) then
set windowname to (get name of window 3)
end if
end tell
set status to away
set status message to windowname
– say windowname
end av chat started
end using terms from
Script name: iChat ended.scpt
using terms from application “iChat”
on av chat ended
set status to available
set status message to “Available . . .”
end av chat ended
end using terms from
You now need to create five alerts in iChat. Open iChat’s preferences, select the Alerts icon, and then set up five new rules, attaching one script to each specified event:
• Event: Text invitation » Run AppleScript » iChat invited text.scpt
- Event: Audio invitation » Run AppleScript » iChat invited audio.scpt
- Event: Video invitation » Run AppleScript » iChat invited video.scpt
- Event: A/V Chat Started » Run AppleScript » iChat started.scpt
- Event: A/V Chat Ended » Run AppleScript » iChat ended.scpt
November 13th, 2008 at 11:05 pm
too bad no one uses ichat…