Wed 24th Aug 2005
Getting the Active Chat in Adium
Posted late evening, filed under Adium , AppleScript.Getting the active chat in Adium from AppleScript appears at first look to be a little dicey: Adium needs to actually be the active application before the code actually works!
For instance, if you open up the Script Editor, and type in the following:
get contact of the active chat of the first interface controller
end tell
You will get an empty list: {}
To get a result, all you need to include is:
just before you access something belonging to the active chat.
If you are creating an AdiumScript, and are testing it in the Script Editor, chances are you have used the idiom:
my substitute()
end run
To get this to work if you are using the active chat, it just needs to be changed to:
tell application "Adium" to activate
my substitute()
end run
Happy AdiumScripting!