This is just something I did to test if it works and it does so I am going to explore the options.
It of course requires you to have 2 AIM accounts. Anyone else doing anything with this?
I found that if iChat is not logged in then the script throws up an error hence the delay.
Thoughts?
--[url=applescript://com.apple.scripteditor/?action=new&script=tell%20application%20%22Indigo%22%0A%09using%20terms%20from%20application%20%22Indigo%22%0A%09%09if%20(on%20state%20of%20device%20%22Living%20Room%20Lamp%22)%20is%20true%20then%0A%09%09%09tell%20application%20%22iChat%22%0A%09%09%09%09log%20in%0A%09%09%09%09delay%2010%0A%09%09%09%09set%20status%20message%20to%20%22Light%20ON!!!%22%0A%09%09%09%09set%20buddy%20to%20%22ABUDDYNAME%22%0A%09%09%09%09set%20info%20to%20%22You%20left%20a%20light%20on!%22%0A%09%09%09%09send%20info%20to%20account%20buddy%0A%09%09%09end%20tell%0A%09%09else%0A%09%09%09tell%20application%20%22iChat%22%0A%09%09%09%09log%20in%0A%09%09%09%09delay%2010%0A%09%09%09%09set%20status%20message%20to%20%22Nothing%20to%20report%22%0A%09%09%09end%20tell%0A%09%09end%20if%0A%09end%20using%20terms%20from%0Aend%20tell]Open this script in a new Script Editor window[/url].
tell application "Indigo"
using terms from application "Indigo"
if (on state of device "Living Room Lamp") is true then
tell application "iChat"
log in
delay 10
set status message to "Light ON!!!"
set buddy to "ABUDDYNAME"
set info to "You left a light on!"
send info to account buddy
end tell
else
tell application "iChat"
log in
delay 10
set status message to "Nothing to report"
end tell
end if
end using terms from
end tell
-------------------------
[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]