I’m working on a floating info window displaying stats for the current Finder selection (see prev posting- I settled for a headless applescript app to poll Finder selection). I’m ‘auditioning’ the custom floating HTML window for the job. It was super easy to get up & running, but I’ve hit enough roadblocks to reconsider. I may be pushing its design - maybe it’s happier filling out forms, not modelessly dallying around, displaying environmental info.
The good news: - I haven’t come across another utility that let me create a floating stats palette so effortlessly.
The issues, by priority:
It doesn’t float “high” enough. KM palettes float above Finder’s QuickLook window, but custom floating HTML does not. Bug? I use QL constantly, and my stats keep dropping behind it. And when I bring it front, keyboard focus gets confused. I have to bring it front, then click back down to a Finder window.
Notify it’s closed (to stop polling Finder, etc) - an async callback in KM when the window is closed would be easiest. i set a window event listener for the “unload” message, but it’s never called. (perhaps KM wants window closed with a form SUBMIT)
(Workaround: KMWillCloseWindow, which calls back up into KM to execute a macro. extra steps/awkward)
Lastly, (extending an already too-long post) I’ll mention that KMs palettes themselves were close to what I need. Though lacking in fine UI control, they’re solid in most other ways. I tried using macros as display elements by changing their names. the dealbreaker: latency. It takes up to 1 second after changing a macro’s name for it to reflect in the palette.
For whomever might be interested, I'll post code on request. Here's a screen movie demonstrating some wins / losses. It's plenty responsive, polling Finder's selection every .5 second. I don't sense any slowdown on my mac.
It reacts quickly to current selection, as it queries image file stats.
It shows cumulative size of multiple files selected. which Finder should just do.
(Finder "preview" pane can show cumulative size of selection but I don't use that)
I also tried using the top 2 KM macro buttons to show stats. See that they're about 1 second behind in updating.
Sadly, finder's QuickLook Window slices in front of floating html prompt.
Thanks for sharing your video demo.
Please do post your code. I'm sure many will find it useful.
May @peternlewis could even figure out how to use it to create a new Macro Trigger: On Change in Finder Selection.
As this project has evolved, polling is less a concern - my AppleScript daemon is happily chugging away. I wonder how one would actually measure it's drag on the system. I’ll presume your clipboard trigger is from an OS notification?
My bigger issue is the restricted communication to the floating window, and getting obscured by Quicklook, as mentioned.
And a wish list item - a window so small would be nice to drag it by clicking anywhere in the window, or with a modified click. I just found this tip about enabling that systemwide with ctrl-cmd-drag.
Why thank you Aktariel. And how timely. I've really been wanting to revive this project.
Since I wrote it, KM's floating html prompt has gained many capabilities that would make the whole thing a lot cleaner. I'm deep in another project right now, but making myself a task to get something posted here within a week. don't be afraid to ping me if I drop the ball...
"Infloatainment"- as I came to call it - has an extendable 'plugin' architecture, making it easy to add modules which could monitor many things besides Finder selection - the clipboard, network traffic, the output on my solar panels...
Stats can be grouped into sections, with a disclosure triangle to hide the group