Targeting a named connection in Apple Script conditional

Got a problem with Viscosity or need help? Ask here!

Osleff

Posts: 2
Joined: Mon Mar 04, 2024 4:24 am

Post by Osleff » Wed Mar 13, 2024 12:03 am
Hi,

according to the docs https://www.sparklabs.com/support/kb/ar ... onnections, I can do sth like this
Code: Select all
tell application "Viscosity"
if the state of the first connection is "Connected" then ...
end tell
However, I feel it's quite clunky to use the order of the connections as a means of selecting the right one. Is it possible to use the name in the context of the this conditional, similar to how I would use it to connect "<name>" it?

James

User avatar
Posts: 2320
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Sat Mar 16, 2024 6:29 pm
Hi Osleff,

You can use the approach listed in the following post:
viewtopic.php?p=8922#p8924

Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs

Osleff

Posts: 2
Joined: Mon Mar 04, 2024 4:24 am

Post by Osleff » Sat Mar 23, 2024 12:26 am
Thank you very much.
3 posts Page 1 of 1