Hi, I am working to do this based upon the existing 3*3 buttons floating menu.
I plan to dynamically set each button as one of the latest app, so kind of like command+tab usage but now showing at the mouse point.
I am now looking for way to update the menu button with an image and text of the lastest app, but it seems i can only change the text but not the image, I have the below script for button "B" for example that will run on first load. Let me know what did i do wrongly
on nameScript(itemUUID)
tellapplication "System Events"
set appList to (name ofeveryprocesswhose background only isfalse) aslist
endtell
if (countof appList) > 1 then
set secondLastApp toitem 2 of appList
else
set secondLastApp to "No app found"
endif
if secondLastApp isnot "No app found" then
set appPath to POSIX path of (path toapplication secondLastApp)
set iconPath to ""
if (do shell script "test -e " & quoted form of (appPath & "Contents/Resources/icon.icns") & " && echo found") is "found" then
set iconPath to appPath & "Contents/Resources/icon.icns"
elseif (do shell script "test -e " & quoted form of (appPath & "Contents/Resources/AppIcon.icns") & " && echo found") is "found" then
set iconPath to appPath & "Contents/Resources/AppIcon.icns"
Starting with 4.746 you can dynamically load items into a floating menu using java script. This is not yet documented but the same scripts as for "Show Context Menu (New)" and "Choose From List" will work.
(additional supports property templateItemUUID to use an existing floating menu item as template)
I can not run your latest javascript in float menu level as your screenshot and code sample suggests. I upgrade my version to 4.739. When I verify the script, there is a popup alert saying
a identifier can't go after this identifier, and it highlights the "async function" string at the start of the script.
it is in the menu level. I guess it might be BTT does not know this is a javascript but still think this is apple script. In menu level, there is no script type selection, not like item level.
I am using your latest 4.746. It is unstable in my mac. I am still using the import preset from
then I delete the buttons inside and add the retrieveJSON to my menu level. after the menu pops up by my trigger, it actually contains latest app icons that i can see. But then BTT crash and reopen. There is something wrong with this version. Please have a look and let me know.
I am also curious why the menu level script execution is based on a interval as your setting that it execute per 6 seconds. Is it more reasonable that the menu should execute the script to pop buttons when and only when it appear?
Here is a nice little example that uses the new radial menu style and shows the last 10 apps. It shows when doing a three finger swipe down, and selects the item once all fingers have been removed from the trackpad
I'm curious if we can show not just currently open applications (like ⌘+↹)... but also ones that were recently closed... could be up to 5 for example...
Hi Andreas, the new circle shape menu is really neat and I like it very much.
In the end I decide to go back to the square 3X3 menu since my purpose is to have a better command+tab so I want the 2nd position icon is always in the middle of the 3X3 menu. In that case, if i pop the menu out and directly click i will switch to the previous app, i can keep on doing this to swap between the latest two apps without looking for the app icon. I give my current script, it basically has an additional logic to manipulate icon index so app icons are shown clockwise from new to old and keep previous one in the middle(index 1 to index 4). I will like to know how can i change the icon's circle boundary to a square with round corner? I am using your current template to only show icon image but I will like the boundary to be square to fit better into this 3X3 menu.
I'm sorry, I'm new, I downloaded the preset but how do I use it?
Where do I go to set some sort of a trigger for it? Do I need the javascript I posted?