AppleScript Locks up BTT when calling UUID

Describe the bug
I'm using three applescripts to control the Microphone volume (mute/unmute/toggle)
The toggle script calls the mute/unmute script depending on the current volume of the microphone.
When executing the toggle script BTT hangs and must be force closed. There was a previous version where this was working perfectly but I'm not sure which version that was.

The toggle script is as follows:

set inputVolume to input volume of (get volume settings)
if inputVolume > 0 then
	tell application "BetterTouchTool"
		execute_assigned_actions_for_trigger "9F590F29-68C5-481B-8B13-D800BCD3131B"
	end tell
	# do shell script "open btt://trigger_action/?uuid=9F590F29-68C5-481B-8B13-D800BCD3131B"
	# tell application "Terminal"
	#	do script "open btt://trigger_action/?uuid=9F590F29-68C5-481B-8B13-D800BCD3131B"
	# end tell
else if inputVolume = 0 then
	tell application "BetterTouchTool"
		execute_assigned_actions_for_trigger "CE77D502-EBCD-42E7-BCDF-08EE24735661"
	end tell
	# do shell script "open btt://trigger_action/?uuid=CE77D502-EBCD-42E7-BCDF-08EE24735661"
end if

Mute script:

set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
	set inputVolume to 80
else
	set inputVolume to 0
end if
set volume input volume inputVolume
return inputVolume

Unmute script:

set inputVolume to input volume of (get volume settings)

set inputVolume to 80

set volume input volume inputVolume
return inputVolume

I'm sure there are other ways to achieve what I'm wanting to do, but I believe this is indeed a bug to report.

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
Keyboard input device

Screenshots
Toggle Script
06%20AM
Mute Script
Can't post because new users are limited to one image?
Unmute Script
Can't post because new users are limited to one image?

Device information:

  • Type of Mac: Multiple, affects MacbookPro 2015 as well as my work macbook pro and my mac pro desktop.
  • macOS version: Multiple, El Capitan, High Sierra
  • BetterTouchTool version: 2.513

Could you try the latest alpha (v2.518)? There have been a few deadlock fixes.

Unfortunately the issue persists even on the latest Alpha.

It's easy to recreate with my scripts.

This problem is more complicated to solve than I expected but I have added a workaround to v2.520 alpha that should work for most cases.