Set Button Title based on variable

I'm using customVariable5 and conditional activation groups to control the visibility of some touch bar buttons. I'm having trouble configuring it how I want, so I'm trying to debug it. I want to be able to see the value of customVariable5. I am trying to display the value of customVariable5 on the touch bar to assist me in debugging.

Since I know that using BTT scripting variables wrapped in curly braces {} will display the value of the variable when used in the HUD Overlay, I tried applying that same logic to the button title. No luck. It displays {customVariable5} in literal plain English.

How do I make the value of customVariable5 display on a touch bar button?

EDIT: On a semi-related note, I'm trying to use either AppleScript or the trigger called "Assign Value to Variable" to modify the value of customVariable5. The AppleScript seems to work most of the time, while the trigger seems to have no effect.

This is one of the AppleScript triggers I'm using:

tell application "BetterTouchTool"
	set_persistent_string_variable "customVariable5" to "FUNCTION_KEYS_OFF, EXTEND_TRUE"
end tell

The above script should be functionally equivalent to using an "Assign Value to Variable" trigger with Variable Name customVariable5 and value FUNCTION_KEYS_ON, EXTEND_FALSE, no?

1 Like