Getting message text from Adium receive message

Hi guys, I am trying to use Adium to trigger some rendering (which will be a separate JavaScript). I can set Adium to run an AppleScript on receiving a message. From that script I can “tell” Adium to get various information, such as the user name for the active chat, their status and info and so on. But, I can’t find any way to actually receive the text of the message that was sent. Additionally, if multiple messages were coming in rapidly from separate contacts, it would be hard to know who sent what, because I have to get the “active chat” from Adium to get the info, and which chat is active will change whenever there’s a new message. So basically I’m having the problem that my script is completely decoupled from Adium; it launches, but has no contextual info about who or why it was launched that I can use. Querying Adium for that info doesn’t really work since there seems to be no way to positively identify the source of a message, and retrieve the text. Anyone know how I’d go about doing this? I thought about trying to read the chat log files and match up message times, but that seems pretty cumbersome, and error-prone. Thanks in advance.

EDIT: I should add that I’m open to using something other than Adium if you know of anything, it just has to support the Yahoo! Messenger protocol. It doesn’t even really have to use AppleScript, I just thought that would be the easiest way.

I have been searching the Internet for well over four hours today and on and off for the past few weeks trying to find out how to get the status message of a particular user so I can have it read out loud. What do you mean by “and info and so on”? If you could tell me how you do this that would be wonderful!

I know how to get the status message of a particular account that I am logged into like this.

tell application "Adium"
	get the status message of 3rd account
end tell

I am trying to get read the status message of a particular user (not one of my accounts) with something like this

tell application "Adium"
	get the status message of user JoeShmo
end tell

This page got me closer but not quite there http://trac.adium.im/wiki/AppleScript_Support_1.2

It seems like this would work based on the AppleScript dictionary

tell application "Adium"
	get the status message of account useraccountx
	end tell

See this image for a quick look at the contact info dictionary for Adium
http://reference.Studioprime.com/forums/macscripter/Adium_Contact.png

I finally figured this out

tell application "Adium" to get status message of contact "friendsemail@gmail.com"

set statusMessage to result

--say statusMessage

tell application "Quicksilver" to show large type statusMessage