Page 1 of 1

Applescript control broken in 1.7.6b1

Posted: Thu Nov 16, 2017 2:36 am
by szymon_k
this (below) used to work, now it doesn't? getting: "Viscosity got an error: AppleEvent handler failed."
Code: Select all
tell application "Viscosity"
	set connectionNames to connections
	set connectedName to ""
	
	repeat with theConnection in connections
		set theState to state of theConnection
		if theState is "connected" then set connectedName to name of theConnection
	end repeat
	
	return connectedName
end tell

Re: Applescript control broken in 1.7.6b1

Posted: Thu Nov 16, 2017 6:17 pm
by James
Hi szymon_k,

Thanks for the bug report - much appreciated! I can confirm we're seeing the same behaviour (looks like it was an issue that was caused by the move from Swift 3 to Swift 4), and it should now be fixed in the latest beta version released today.

Also, you can shorten your script down to just the following :)
Code: Select all
tell application "Viscosity" to return name of first connection whose state is "connected"
Cheers,
James