Question: What are the JSON elements that can be edited using applescript?

What are the JSON elements that can be edited using applescript?

I know that if you return a json you can change the icon, name, font color, etc..

What is the full list of identifiers, etc?
I'd specifically like to change paddings and spacings. (this is for the escape key seen in AQTv3 which can take form of two styles from it's settings, but currently needs two different widgets that show/hide to do so instead of one widget that changes it's look.)

By returning from apple script the original widget is not changed, only the displayed stuff. This approach only allows to update the things that are listed in the configuration view.

However using the update_trigger method you can change anything, there is no limit to what you can change.

For an example e.g. have a look here: update_trigger removes uuid of target...
Or the docs for the update_trigger method:

so paddings, corners and space to next cannot be controlled using applescript?

And also, are UUIDs stable to reference? will they change in any way or clash with other presets? Iā€™m a bit reluctant to use UUIDs

The update_trigger method can be called using apple script :slight_smile:

tell application "BetterTouchTool"
	update_trigger "ECAC2A48-C525-42A9-802B-687816D2C8FB" json "{\"BTTTriggerConfig\":{\"BTTTouchBarButtonColor\" : \"254.7, 29.7, 87.0, 255.000000\"}}" shared_secret "XXXXX"
end tell

UUIDs are stable and won't clash with anything (the probability for generating two same UUIDs is basically not existant). According to wikipedia, regarding the probability of duplicates in random UUIDs: Only after generating 1 billion UUIDs every second for the next 100 years, the probability of creating just one duplicate would be about 50% .

1 Like