iChat - script fix


Now that this is in the right forum :stuck_out_tongue:

I tried using this script:

property was_online : {}
property watch_list : {}

set was_online to check_ichat()
set watch_list to {"important buddy"}

on idle
	set is_online to check_ichat()
	repeat with x in is_online
		copy contents of x to y
		ignoring case, expansion and white space
			if y is not in was_online and y is in watch_list then display dialog y & " is now online!"
		end ignoring
	end repeat
	set was_online to is_online
	return 10
end idle
to check_ichat()
	tell application "iChatAgent" to name of accounts of service 1 whose status 1 is not offline
end check_ichat

That has been changed from the orginal script that was given to me from a member on these boards; however, when I try to compile it and then run it, it says I must define “accounts”, “service”, “status”, and “offline” and that I can’t have “1” after service…what exactly can be done to fix this?

iChatAgent isn’t a scriptable application. Switch it back to iChat. iChat must be open for my script to work.

Edit: looks like an extra ‘1’ cropped up after ‘status’ too. For reference, here is the original script.