hi all, I'm new to apple script. i'm trying to write a simple script to get ichat to close a window that always open after i log in to Jabber. so far i managed to do this line that close the window tell application "iChat" to close window "msn.jabber.meta.net.nz" the problem is that the window opens some time after the login is finished so if i choose to run it when login finished i get an error from ichat. so i tried to do a loop with many variations but nothing helped. this is the latest version i come up with (it is probably wrong in so many ways as i'm not really used for the applescript syntax) tell application "iChat" if (login finished for "msn.jabber.meta.net.nz") then tell application "iChat" to close window "msn.jabber.meta.net.nz" end if end tell can someone help me and point me to the right direction?? thanks in advance for your time.