Okay, I am very new to applescript. I read a few pages of apple’s docs then got bored and went right to scripting.
Basically I want to make a script that returns a list of all online, offline or idle users. Here is what I have (ignore the poor variable naming).
on run
tell application “iChat”
activate
log in
set numberofitems to account count
repeat with n from 1 to numberofitems by 1
if {account n, status is available} then
set bob to {account n, name}
set bob to babafett as item
end if
end repeat
end tell
end run
It tells me that no result was returned from that bit in the brackets (between if and then). I don’t get it because this looks fine to me. Help?