Skip to content
Cannot access connection `serverAddress` property
Got a problem with Viscosity or need help? Ask here!
Hello,
I am attempting to check my connection's address with the `serverAddress` property shown in the docs with the following command:
Thanks in advance.
I am attempting to check my connection's address with the `serverAddress` property shown in the docs with the following command:
Code: Select all
This used to work, but now it returns an error:set addr to serverAddress of connections where state is equal to "Connected"
return addr
Code: Select all
Is the serverAddress property no longer accessible?Can’t make serverAddress of every connection whose state = "Connected" into type specifier.
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:
James
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
Cheers,tell application "Viscosity"
set addr to serverAddress of first connection where state is equal to "Connected"
display dialog addr
end tell
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs
2 posts
Page 1 of 1