Describe the bug
If the action "Run AppleScript (async in background)" is assigned to any trigger, clicking "Run Script" in its configuration dialog immediately crashes BTT. It doesn't matter what the script is or if a script is entered at all – the button behaves like it is hard-wired to crash.
This does not happen with a blocking script (or after disabling the "run in background" option from the config dialog). Neither does it happen when running from the "Advanced Configuration" dialog of, for example, the Touch Bar "Run AppleScript" widget.
Also, if a valid script is entered and saved without running from the config dialog, the resulting trigger properly executes the AppleScript – no issues.
You're right. say "Hello" crashes, but return "1" does not. (And contrary to what I thought before, the AppleScript is executed in both cases; I could definitely hear a friendly voice saying "Hello" before BTT crashed. ;-))
I'm not sure what you're trying to do here. When is this AppleScript run? Who sets the clipboard's contents prior to its execution?
Multiplying the the clipboard's contents times 7 will naturally only work if the contents are a number. If not, your set dly line will throw an error. Most likely that's what's causing your script to fail sometimes. (BTT doesn't seem to handle AppleScript errors very well and might simply crash if there is one.)
Perhaps you could generate your variable delay without the use of the clipboard (which is easily disturbed by events outside of your AppleScript)?
The Applescript is run as part of a BTT sequence which starts a Fake.app workflow. Fake gets a value from a web page and puts it in the clipboard.
I tested that the clipboard was a number in case that was the reason and it was so it wasn't the reason for BTT hanging. Yes, I or something else using the clipboard could mess this up but it's unlikely as it's soon after I push a FN button so I don't think this will be an issue and certainly wasn't during my testing.
So, I did some more experimenting and it seems that, although they are not enabled, the BTT commands still get actioned. Once I deleted the ones I had temporarily de-enabled, everything seems to work fine. These commands must have been interfering somehow.
So, with the check-box next to an assigned action not ticked, shouldn't BTT not perform that action? Maybe this is a different bug? Or did I assume incorrectly?