Visual feedback button

Hi there,

I am very new to AppleScript. I have written a script to toggle "Low Latency Mode" in "Logic Pro X" -
tell application "System Events" to tell process "Logic Pro"

set tracks_window to title of first window whose title contains "- Tracks"

set frontmost to true

tell checkbox "Low Latency Mode" of group 1 of window tracks_window

click

end tell

end tell

I would like to know exactly what I need to do to update the trigger so I can use an alternate background colour when low latency mode is toggled on?

I added this to the widget specific AppleScript text field but it just makes the background permanently green.

tell application "BetterTouchTool"
update_trigger "7208848C-339D-4340-A993-90CB2EE25020" json "{ "BTTTriggerConfig" : { "BTTTouchBarButtonColor" : "110.000001, 193.000004, 56.000000, 255.000000" } }"
end tell

Sorry I know its a bit basic but I've really tried hard to work it out, to no avail and messaging here. is my last resort

Thanks in advance :slight_smile:

Im a paying customer and id like some support please

I think don't fully understand. Your code looks fine, you just need to call that part:

tell application "BetterTouchTool"
update_trigger "7208848C-339D-4340-A993-90CB2EE25020" json "{ "BTTTriggerConfig" : { "BTTTouchBarButtonColor" : "110.000001, 193.000004, 56.000000, 255.000000" } }"
end tell

From within your other script where you enable or disable low latency mode (and switch the color back if you disable low latency mode).
If you just run that script without any other conditions, it will update the color regardless of the low latency status. So if you would want to run it regularly to check whether low latency mode is enabled, you'd need to add some logic to the script which can check whether low latency mode is enabled.

I don't know much about Logic Pro X, but your script above looks like it could be adapted to check whether low latency mode is active or not.

Imprint | Privacy Policy