Upgraded to MacOS Sequoia 15.4.1, updated to latest BTT (5.294) -> shell script stopped working

This script used to work just after upgrade to Sequoia.
I updated BTT from 4.318 to 5.294 and I'm getting this error now.


Device information:

  • Type of Mac: MacBook Pro M1 16"
  • macOS version: Sequoia 15.4.1
  • BetterTouchTool version: 5.294

does your script work if you run it from terminal? There are often changes to the terminal apps between macOS releases, maybe something changed there

Hey here are a couple of points:

  1. It ran in BTT 4.318 after the OS upgrade and before BTT upgrade.
  2. It stopped running after BTT upgrade.

I don't think I ever attempted to run it directly via terminal because it has a lot of quotations.

Ah I see what the issue is.

If I put anything in {}, I get it replaced with text "error: BetterTouchTool scripting disabled" and it messes up the script.

The thing is that I don't use BTT scripting, I just need that string to be a part of my script.

ah that might explain it, can you check whether 5.333 alpha resolves this? (uploading, available in ~10min)

Ah I got it!
Whenever BTT sees an { in the text, it thinks there's a BTT scripting involved and inserts that warning text in place of anything within {}.
I managed to hot-fix the issue by allowing scripting in settings and entering a big bogus password.
Thanks for the quick response!
Since there's a workaround, it may not require an urgent fix. (However, there might be breakages and confusion for other users)

yes it's because a few months ago support for dynamic variables has been added, and these can do scripting. BTT always checks for things inside of curly braces whether there is a matching variable.

It's probably not a very common issue because most users have BTT's scripting support enabled (and for the rest probably not many run scripts with curly braces).

Anyways, it should be resolved in 5.333 alpha

1 Like

Andreas, thanks for the quick update!
May I also suggest an improvement where the user could disable these substitutions? I'm worried that some constructs suddenly can be replaced with something else without any warning.
To be clear, I use that field to put a bash script in it. Bash scripts can include expressions in curly braces. I would like them to be passed as is without any alterations.

As a mitigation, is there a known way to quote these things to make sure they are not substituted?

Maybe I can add a setting for this, I'll check. However in order to get substituted they would need to exactly match one of your BTT variables.

1 Like

I've installed 5.340 and can confirm that it works fine!

Regarding substitutions, I understand it has to match exactly. However, there are a couple of concerns:

  • It can accidentally match something unintentionally, and there's no clear way to escape it.
  • Something might work for a while, but then a new variable is introduced with that name and it suddenly breaks.
  • Conversely, I might expect a substitution, but due to a typo, it silently fails.

I understand it's been in place for a while and it might be too late to change the behavior, but I'd still consider exploring some way to make it escape-able - just to prevent subtle issues or unexpected behavior in the future.

For example, the check for substitutions could be done right when editing the text.

1 Like