"After BetterTouchTool Did Launch" Trigger not triggering

On version 4.272 this trigger is not running after BetterTouchTool launches. I am using this simple AppleScript to set a few variables:

tell application "BetterTouchTool"
    set_string_variable "VolumeGroupOpen" to "false"
    set_string_variable "BrightnessGroupOpen" to "false"
    set_string_variable "ExtraStripGroupOpen" to "false"
    set_string_variable "MusicControlsGroupOpen" to "false"
end tell

works ok here, how did you check whether the script did run?

By going to my If statement in BetterTouchTool and checking whether the variable is there, 10 seconds after the startup. In order to check this I used If -> Configure Conditions...

Then I pushed my touch bar button that checks whether the variable is set and nothing happened, meaning the If failed so the Else part triggered.

The next time I pushed the button, it opened my group and from then on, everything worked well.

Also, important to note here is that first time after I pressed the button, the If statement configuration corrected itself.

This feels like you need to synchronously prioritize getting the boot procedure to run before (re)configuring user triggers?

Or am I putting my initial variable declarations in the wrong place, @Andreas_Hegenberg?

I'll have a closer look tomorrow, I could imagine some timing issue on when BTT reloads the variables and when the script is run.

However I'd recommend to just change the IF to check for "if (VolumeGroupOpen != "true")" instead of checking for false - because then it will also be true if the variable is not yet set. So if you don't use persistent variables, the variable will be undefined after a BTT restart, and the first use of the trigger will set it to true.

1 Like

That did the job! Looking forward to hearing if everything's well with the boot script, though!