I'm looking for a way to…
- find all KB HTML Prompt windows that are open,
- depending on their number, arrange them in a grid.
Background:
I built myself a tool where I can dictate ideas or letters on my phone, and then have them pop up on my desktop computer. The transcription is managed by a web server (using Google Cloud), and it then calls a KM macro on my computer using the Public Web Trigger, in order to display the results right on my screen. This way, when I come back to my desk, I'll have the text on there.
I'm using HTML prompts instead of "Display Text" windows, because I can have the HTML prompts appear like colored notes. This way, it looks like a bunch of colored sticky notes on my screen, and they are "always on top".
However, right now, KM will open each prompt on top of the other.
What I would like instead is:
- Pre-define an area of my screen allotted to such notes,
- Then divide this space among all open HTML Prompts.
That means, the first prompt will fill the entire space. Once a second prompt opens, the first prompt will be resized to 50 %, and the second one will open at 50 %, at an offset of 50 %.
It should look like this:
I imagine that the solution would be perhaps an AppleScript. It would be called whenever a new prompt is opened, and it would count all open prompts and then re-arrange them, so that all are visible and distributed evenly within the allotted screen space.