Page 1 of 1

Cannot access connection `serverAddress` property

Posted: Wed Nov 07, 2018 6:09 am
by passogba
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.

Re: Cannot access connection `serverAddress` property

Posted: Wed Nov 07, 2018 10:06 am
by James
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