SparkLabs Forum.

Community Help.


Cannot access connection `serverAddress` property

Hello,

I am attempting to check my connection's address with the `serverAddress` property shown in the docs with the following command:

Code: Select all

set addr to serverAddress of connections where state is equal to "Connected"
return addr


This used to work, but now it returns an error:

Code: Select all

Can’t make serverAddress of every connection whose state = "Connected" into type specifier.


Is the serverAddress property no longer accessible?

Thanks in advance.
Hi passogba,

It looks likely to be a syntax problem with your script: there could be multiple matching connections. Try something like so instead:

Code: Select all

tell application "Viscosity"
   set addr to serverAddress of first connection where state is equal to "Connected"
   display dialog addr
end tell


Cheers,
James
2 posts Page 1 of 1

Copyright © 2016 SparkLabs Pty Ltd. All Rights Reserved. Privacy Policy