on run tell application "ircle 3.1.2 OS X" if not (exists (argument 1)) then echo serverprefix & " Usage: /c " echo serverprefix & " Selects the connection in question, then returns the status of said connection." beep else -- opening/connected/userclose/serverclose try set foo to (argument 1) as number if foo is greater than 0 and foo is less than 11 then select connection foo if status of connection foo is offline then set bar to "offline" else if status of connection foo is namelookup then set bar to "namelookup stage" else if status of connection foo is opening then set bar to "opening" else if status of connection foo is connected then set bar to "connected" else if status of connection foo is userclose then set bar to "closed by user" else if status of connection foo is serverclose then set bar to "closed by server" end if echo serverprefix & " Connection " & foo & " is " & servername of connection foo & " (" & bar & ")" else echo serverprefix & " Usage: /c " echo serverprefix & " Where connection number is one of the 10 main connection numbers." beep end if on error msg number num echo serverprefix & " ERROR " & msg & " (" & num & ") in script /c" end try end if end tell end run