AppleScript get chat message text? - work around?
Posted: Wed Mar 19, 2008 3:51 pm
I'm seeing clues that this may not be possible? Here are my original thoughts:
I'm attempting to make an AppleScript fortune cookie trigger when any chatter other than myself mentions the word "fortune". I'm close, but am having trouble accessing the incoming chat message:
tell application "Adium"
set chatText to the ???? of last chat of the last chat window
if chatText contains "fortune" then
set displayName to the display name of account of last chat of the last chat window
send the active chat message "Fortune for " & displayName & ": You will make money someday."
end if
end tell
Any thoughts on this? Also, does this look right for the last received chat message for any window? Thanks much.
I'm attempting to make an AppleScript fortune cookie trigger when any chatter other than myself mentions the word "fortune". I'm close, but am having trouble accessing the incoming chat message:
tell application "Adium"
set chatText to the ???? of last chat of the last chat window
if chatText contains "fortune" then
set displayName to the display name of account of last chat of the last chat window
send the active chat message "Fortune for " & displayName & ": You will make money someday."
end if
end tell
Any thoughts on this? Also, does this look right for the last received chat message for any window? Thanks much.