I failed to move (change the position) a floating menu by using the action "Update Floating Menu Properties," so I decided to find a way to do this in JS.
All I could find was how to tweak menu items, not the menu itself.
Sorry for asking such a basic question and if the doc already exists.
you could try calling the predefined action „reposition floating menus“ after changing the properties. Make sure to be on the latest version, there have been some improvements recently.
The reason why it didn't work was that I was setting the "Menu Name / Identifier" field, not the very top "Menu UUID."
But still, checking "Animate Changes" doesn't do the job.
And thanks for the JS tips. I was not aware that feature of Copy as JS or AppleScript!!
(another reason why I should not use the old view for triggers)
Is there any chance I can make a custom action with JS? Since we can copy any action as JS, why not the opposite? That would be great for JS that I use often.
Just a nice and simple GUI wrapper for running JS/AS, with some text fields for args for the JS function.
I don’t understand what you mean by custom action. Can you explain? If I understand correctly you can already do this with the „run real java script“ action.
Yes, "Run real JavaScript" can do the same!
I'm talking about the UI/UX for using scripts.
I realized that "Named Trigger" can do close to what I want to use, but if I could pass args to the trigger (to me, it’s an action) that would be nicer. Copying and pasting around JS all over the actions and modifying the only args/vars to use for the particular action each time is just an unpleasant UX for me. And if you find a bug or need some modification for those copied scripts with micro differences, you have to repeat the process to apply the change to all of them. (I'm aware we can use an existing JS file too, but this doesn’t fix the UX problem here). It would be nice to have reusable custom actions that allow some inputs.
For example, I often toggle a variable value with a trigger. It would be nicer if I could just use the “Toggle Variable Value” the custom action I created, and pass the variable name in a text field. Done. It’s better than finding the JS to copy from another action, then pasting it, and making sure I'm not accidentally modifying the code by hitting the run JS button. What's really great is that I can change the content of the script/function, and it applies to ALL the custom actions with one click!
It's not about what BTT can perform, but how we can use BTT.
Main question: Can a floating menu change its position with animation?
Changing sizes seems to work fine with animation, but not for positions.
Ah I understand. I think it would be a good idea if a named trigger could additionally provide a configuration UI. The right sidebar content can be defined in JSON, so that might work.