Good afternoon all,
I hope you can help me out here. I’m trying to script Colloquy, more specifically, I want to find out which of my connections are currently connected.
Here’s the code I have
[code]tell application “Colloquy”
repeat with theConnection in every connection
if status of theConnection is (connected) then
-- Do something if the connection is connected
end if
end repeat
end tell[/code]
The problem is with the “if status of theConnection is (connected) then” line. As you can see the word connected is being put in brackets. I think this is because it’s type, if that is the correct term, is a constant (Script Debuger displays, in the results panel, constant (‘enum’), which I think means it’s an enumerator or it’s enumerated). When I run the above code and it hits the aforementioned line SD gives me an error: “No result was returned from some part of this expression.”
All I want to do is to find out if a connection is connected and if so do something with it.
Any advice appreciated.