Show return value on button press

It would be nice to have a touch button that is set to return a Shell Script or AppleScript value be able to display only the icon but when pressed shows the return value.

Love the app! Saved me from returning my MacBook Pro!

You can do this, but it would require some Apple Script http://docs.bettertouchtool.net/docs/apple_script.html
(using this you can use the update_trigger method to change the only icon property).

For example you would attach this apple script using the predefined action "Run Apple Script" to a Touch Bar button/widget

tell application "BetterTouchTool"

update_trigger "2F34005D-4537-464D-94E9-A7F42DA39DF1" json "{\ "BTTTriggerConfig\" : { \ "BTTTouchBarOnlyShowIcon\" : 0 } }"

end tell

(The uuid would need to be replaced by your widgets uuid)

Does the touch button need to set as a TouchBar Button or Widget/Gesture?

If it's a Touch Bar Button do I set it to Run Apple Script Async or Blocking?

Async/blocking doesn't matter.
If you want to use a button you will also need to change the title, like this:

tell application "BetterTouchTool"

update_trigger "2F34005D-4537-464D-94E9-A7F42DA39DF1" json "{  \"BTTTouchBarButtonName\" : \"The New Title\", \"BTTTriggerConfig\" : { \"BTTTouchBarOnlyShowIcon\" : 0 } }"

end tell

Perfect! I do have another dumb question, how do I set one of my JSON values to a variable?

ex. "{ "BTTTouchBarButtonName" : [place variable here] }"?

Here is the script I am currently working on:

set clock to do shell script "date +%D"

set clock to do shell script "date +%D"

tell application "BetterTouchTool"
update_trigger "78AB8940-34B2-49FE-8AB8-19ED73A069FE" json "{ "BTTTouchBarButtonName" : "Test", "BTTTriggerConfig" : {"BTTTouchBarOnlyShowIcon" : 0 } }"
delay 3
update_trigger "78AB8940-34B2-49FE-8AB8-19ED73A069FE" json "{ "BTTTouchBarButtonName" : "", "BTTTriggerConfig" : {"BTTTouchBarOnlyShowIcon" : 0 } }"
end tell

Ideally I would like to put my variable clock where I have "Test"

set clock to do shell script "date +%D"

tell application "BetterTouchTool"

update_trigger "78AB8940-34B2-49FE-8AB8-19ED73A069FE" json "{\"BTTTouchBarButtonName\" : \"" & clock & "\", \"BTTTriggerConfig\" : {\"BTTTouchBarOnlyShowIcon\" : 0 } }"
end tell


Wow I was doing it so wrong. Forgot that "" closed out the string segment. Genius!

Looks like I will digging more in depth with AppleScript.

Thank you so much for you help and patience!