Floating Menu Alpha Development Thread

have you already tried the standard example for the "Transform & Replace Selection With Java Script" action?

For SFSymbols:
I'll change it to work with any case, didn't know it was case sensitive.
Some SFSymbols support multiple colors, you can test this with Apple's SFSymbols app:

Yes, I've tried "Transform & Replace Selection With Java Script" But with a different script, now it works! Thanks :slight_smile:

For the SF Symbols, The Monochrome color option in BTT wasn't working before, and didn't show the icon in the button (that's why I went for Custom color), now it works IDK what changed!

After testing I can say: It is almost perfect.The position of the floating menu shifts only in one case. But then (almost) always.

  • When the modifier visibility is changed. So, if modifiers are activated or deactivated.

The display of the buttons is unfortunately also still incorrect.

Example: A button is changed from always visible to only visible when a modifier is pressed. This works. But if you change it back to always visible, all sorts of things happen. The button is visible when any modifier is pressed etc.

Could you have another look at this when you get a chance? Thanks :slight_smile:

Can't find a way to run a certain script at a certain time/times of the day (Like we have with Automations), I think it would be super useful to have that for floating menus also!

:bulb:Idea:bulb:

Will it be possible to add support for Drag & Drop as a Floating Menu action, then the file/files will act as input for a certain shortcut.

Application example:

A shortcut that turns WebP Images into JPG, I can Drag Images in there then the Shortcut runs with that image as the input.

Would be super amazing to have that functionality!

drop targets are a great idea, I'll add that somehow. (It's already possible with the webview items, but requires some scripting)

you can do.that with time based triggers in the automations, named & otherr triggers section

yep, modifiers are still broken.Will fix asap!

With a WebView, it won't connect to Siri shortcuts.

I have the script in a floating menu.

you can use the same script in time based triggers :slight_smile:

The webview in BTT is special as it can do all sort of things including running shortcuts :
https://docs.folivora.ai/docs/10_0_floating_html_menu.html

https://docs.folivora.ai/docs/10_3_1_shortcuts.html

But drag&drop makes sense to have on standard menu items as well, I'll work on it tonight :slight_smile:

You mean as a Dynamic variable then map it in the floating Menu?

Yes, a native Drag and drop module option is great to have!!

I mean by using the "Repeating or Time Based Trigger" and assigning the "run real javascript" (or apple script) action:

:bulb:Idea :bulb:

About Dragging and dropping, here's another advanced idea!

Having an area to drag and hold multiple files [Display the names of the files in a list or preview grid or something]
Then Have Shortcut buttons underneath.

I add the files I want to process in the area, once I have all the files I want, I choose what to do with them [Click on a shortcut button], process the files, and remove them from the list.

With a little lock icon :lock: to trigger locking the files to process them multiple times.
And ofc have an icon :broom: to clear the selected files.

So basically the Drag and Drop module accepts one file, this one can accept and display multiple.

Could also be 1 single module with the option to accept 1 file, Multiple files or an X amount of files.

Being able to drag and drop a single file onto one of the shortcut buttons for quick processing is a major advantage!

What do you think?

I'll finish the first documentation for floating menu stuff on Monday, this will make it clearer.

You can update any menu item from anywhere by calling

via item UUID

	tell application "BetterTouchTool" to update_menu_item "D7E5C96D-8F36-4438-9D69-9C76B4F75209" json "{ BTTMenuItemText: 'hello world' }"

via item name & menu name

	tell application "BetterTouchTool" to update_menu_item menu_name "the_menu_name" item_name "the_item_name" json "{ BTTMenuItemText: 'hello world' }"

These allow to update any property of the item, e.g. background color etc.

But I want the script to call a webhook, get the data and display it in a floating menu.

I'll post an example on how to do that when I'm back home!

Thanks Andreas !

v4.110 should fix some modifier issues. It also adds basic support for Drag & Drop.

Here is an example preset that shows how to access the dropped files either via JavaScript or by directly passing them to a Apple Shortcut: https://share.folivora.ai/sP/88dbbda8-2a64-4de0-af9b-f839e08c4e5c

The shortcut action now has a checkbox to use dropped files as input

Here is a link to an example shortcut that just opens the dropped files but can easily be modified to do anything with them:
https://www.icloud.com/shortcuts/f029545377974eed92f7fe17161e8c06

1 Like

Exciting !!

I was trying it out, first with one of my shortcuts that turns a PDF into images, didn't work.

Here's mine:

But when I tried your shortcut, it worked. :white_check_mark:

When I drag a file into it, it saves it along with the previous file.
when I click the button without dragging any file, it opens the last 2 dragged files.
Sometimes it opens 4 files when I drag just one.

Definitely an amazing addition to BTT !! :star_struck:
Would be great if I could change the Background to a custom-made dragging zone design png image, something like this.