|
Armin's Spot on the Web |
Discussion |
|---|---|
iChat Status Message Script
I think I am a little late on this party. iChat AV, aside from this video chat feature, now can be scripted with AppleScript. Obviously the most fun will be scripting the status message. Cocoaobjects has some status message scripts, mostly with iTunes. But I would like to put some code up as well. Scripting the status message is really simply, but it is also a great opportunity to use the property delayTime: 5 global oldMessage on run tell application "iChat" set oldMessage to status message end tell cycleMessage() return delayTime end run on idle cycleMessage() return delayTime end idle on quit tell application "iChat" set status message to oldMessage end tell continue quit end quit on cycleMessage() tell application "Finder" tell application "Finder" set currentApp to name of first application process where frontmost is true end tell set message to "is working in: " & currentApp tell application "iChat" set status message to message end tell end tell end cycleMessage The first two line are interesting, I setup A global is a variable that is available to all parts of code. We need to access the stored value tell application "iChatStatusMessage"
set delayTime to delayTime +10
end tell
to access and change the The code has four handlers:
In the Finally, |
|
This page was last updated: Tuesday, November 18, 2003 at 12:42:59 PM Copyright 2010 RSVP - Please Reply Mail me @ arminbatmacdotcom |
|