Is it conceivable to create a macro to toggle show / hide multiple displayed engine text windows?

I frequently use KBM to display reminders (display text in windows+ cron). Sometimes I end up with 5 text windows displayed on my screen which hide the underlying app windows. Ideally I would be able to toggle show / hide those engine windows to allow me to gradually process the reminders one by one.
thanks in advance for your time and help

The problem is that those aren't "real" windows—they don't exist as far as the OS is concerned, which means (unless I'm overlooking something) there's no way to directly control them. You can't activate them, switch to them, move them, etc. They're just "there."

You might be able to cobble something together based on mouse clicks at locations, but you'd still have no idea which particular window you were clicking on unless you then copied its contents and analyzed them in KM.

Maybe someone else has some different ideas, but I think your best bet would be to modify the macros to create Stickies, because Stickies are real windows and they have titles and can be controlled. You can't, however, control them one by one, so that part wouldn't work. I'm not personally aware of an app that lets you hide individual windows, though I'm sure they must exist.

-rob.

1 Like

thank you very much. You saved me a lot of time. My favorites Stickies app is Antnotes, and I will try to use a cron trigger to trigger the display of an Antnote. Stickies or Antnotes have the added advantage of being editable. thanks again very much !

Easiest way would be to minimise them all to the Dock, then you can recall them one-by-one by mouse-click to process them.

tell application "Keyboard Maestro Engine"
	set miniaturized of every window to true
end

Pop that into an AS action inside a macro with your preferred triger -- and off you go.

1 Like

Wouldn't that also minimize the KM Editor window itself, if it happened to be open? And you still couldn't tell which one you wanted to work on, right? It'd be strictly consecutive.

Another thought would be the Reminders app, which is AppleScriptable (unlike Stickies), and can act like, well, real Reminders :).

-rob.

1 Like

We're telling the Engine to minimise windows -- not the Editor.

It'll minimise HTML Prompt windows too -- but I suspect that'll be a bonus rather than a problem! But no, you can't see the contents of a minimised "Display Text" if you mouse over it in the Dock.

2 Likes

The solution proposed by @Nige_S works perfectly. Exactly what I wanted: to get those engine windows off the screen. I ran some tests and the macro does not minimize the KM editor.
Thanks very much to both of you !

1 Like

@griffman @Nige_S
Another script by @Nige_S that I use a lot is to close all engine windows in one shot. VERY useful.


tell application "Keyboard Maestro Engine"
	close every window
end tell