Launch Floating Menu from Shell

Hi, I'm trying to trigger a floating menu (the radial app switcher from your shared preset) from shell using the formula open "btt://execute_assigned_actions_for_trigger/?uuid=....."
but only got it to open BTT's config page instead of showing the floating menu. Maybe I'm doing it wrong?

what exactly is the uuid you provide referring to? It would need to be some trigger you have configured that calls the "Show Floating Menu" action.

A nicer approach is to define a named trigger for that:

Then the link looks like this:
btt://trigger_named/?trigger_name=ShowFloatingMenu

I've tried copying the UUID manually and also getting it from contextual menu link to trigger but haven't been able to make it work with the "open " formula in shell. Same output when triggering thru a NamedTrigger:
open "btt://execute_assigned_actions_for_trigger/?uuid=DA080132-100C-4B11-B614-CD2015FB5C0C"
open "btt://trigger_named/?trigger_name=LaunchFloatingMenu1"

Maybe there is some setting missing activation for Floating Menus from shell? or maybe some setting in the Floating Menu itself? (Got other Triggers to work from shell fine)

K.

mhh it seems to work fine here, which version of BTT are you on?
You could try via apple script instead:

osascript -e 'tell application "BetterTouchTool" to execute_assigned_actions_for_trigger "DA080132-100C-4B11-B614-CD2015FB5C0C"'

or

osascript -e 'tell application "BetterTouchTool" to trigger_named "ShowFloatingMenu"'

Got "missing value" for both attempts with osascript. Same output on two different computers (similar configs, both on Ventura and last BTT's version 4.936) The weird thing is I'm able to trigger some actions like "show/hime menu bar icon items..." (open "btt://execute_assigned_actions_for_trigger/?uuid=F772C2FE-BE46-4389-8C81-70ADFDC4FB14").

Do you think there could be some corrupt setting or maybe something in my systems that could be intefering?

K.

mhh yes it's weird that some seem to work. Can you check whether scripting is in general activated here? Is there maybe a shared secret set?

Checked. Activated in both computers. No SharedSecret set. Could it be something with Floating Menus configuration? Could you think of something that could be in conflict with showing/rendering? Z level?

does it work if you press the play button on your named trigger action sequence?

If so the menu config should be fine

Yes, the action sequence itself would trigger, but If no action is selected then the Play Button won't be available and the menu it self won't make itself visible (This does happen when pressing the "Toggle Menu visibility now" button or when called by a normal BTT trigger like a Keyboard Shortcut)

Could you maybe post a screenshot of your config for the named trigger? I think there might be some misunderstanding

You can also try this more complex way via apple script:

//edit, sorry the escaping is complex. It works like this. Replace xxx with your menu name:

osascript -e 'tell application "BetterTouchTool" to trigger_action "{BTTPredefinedActionType: 386, BTTAdditionalActionData: \"{\\\"BTTMenuActionMenuID\\\":\\\"xxx\\\",\\\"BTTMenuActionRestorePosition\\\":true}\"}"'

Should I customize info on this entry? (Otherwise is returning "missing value").

Looks like the named trigger itself is been reached. Activated the HUD Overlay when triggerd and it shows fine but no Floating Menu appears.



Ah, you can not show a Floating Menu like this.
Instead you need to use one of the pedefined actions like "Show Floating Menu":

1 Like

That was it! Thank you! Do you know where can I consult the list of "BTT.Actions" like the BTTActions.copyLaunchedApplicationsInFrontToBackOrder() used in the Radial App Switcher Preset?