Autoreply is a read only property of the status objects, not account objects. So you can't set it in the way you are trying to. Accounts only allow for temporary status settings of "status type" and "status message."
More info here:
http://trac.adiumx.com/wiki/AppleScript_Support_1.2
The only way to set an autoreply is to first create a status with the make new command and include the autoreply property:
Code: Select all
tell application "Adium"
make new status with properties {status type:away, title:"I'm not here", message:"I'm not here", autoreply:"Your message will be read when I return"}
end tell
Then set the current status to the newly made status.
The make new command is broken in Leopard (10.5):
http://trac.adiumx.com/ticket/8863
I believe it's been reported to be functional in Tiger (10.4).
One way around the problem is to wrap the make new command into a try block because even though the make new command errors out, the status is still created:
Code: Select all
tell application "Adium"
try
make new status with properties {status type:away, title:"I'm not here", message:"I'm not here", autoreply:"Your message will be read when I return"}
on error
set status of the first account to the first status whose title is "I'm not here"
end try
end tell
When I tested this though, the autoreply didn't seem to get filled in properly. It set the "autoreply" flag, but the custom autoreply message didn't get populated. I'm testing on 1.3svn though. The results may be different with 1.2.5.
Sending a message in Adium first requires a chat be opened with the contact because you can only send a message to a chat, not to the contact. So you must first make a chat with the contact, once the chat is made you can send a message to the chat. So the generic method of sending a message to a contact would be:
Code: Select all
tell application "Adium"
tell account "accountname" to set myChat to make new chat with contacts {contact "contactname"} with new chat window
send myChat message "test"
end tell
It only opens a new chat if one is not already open.
A word of caution, the contact *MUST* exist, or you run into another bug which causes very odd behavior with windows:
http://trac.adiumx.com/ticket/8864
Using these examples it should be possible for you to come up with a solution (hopefully). Once you have a solution it would be good if you posted it in the forum so others can benefit from it.