Auto Insert Center Next Display Text in Window Action

Howdy folks,

I found myself spending a not insignificant amount of time getting sizing just right whenever I would need to add a Center next display text in window action in a macro. So I built this macro that automatically calculates the size for whatever display text (or shell script results) window is on the screen and then insert the action already populated with those figures above the currently selected action.

More details, a screenshot and screen recording are below. As usual, feel free to share any comments or suggestions, or to let me know if it doesn’t work for you.

-Chris

CURRENT VERSION: 1.0.0 (Wednesday, November 27, 2024)

34 AS KM Editing Insert center display text window action.kmmacros (14.7 KB)

Macro Screenshot (click to expand/collapse)

Screen recordings (click to expand/collapse)

Macro screen recording

RELEASE NOTES, INSTRUCTIONS AND DISCLAIMER

Version History

v1.0.0 Thursday, August 15, 2024
Initial macro

Purpose of this macro (click to expand/collapse)

Automatically insert a Center next display text window action with it’s size pre-calculated

How this macro works (click to expand/collapse)

An AppleScript gets the current size for an Open Display Text In a Window (or Shell Script Results) window.
It then runs some calculations to determine it’s center position on the screen.
After, it sets the clipboard to the XML for a Center Next Display Text in Window action and pastes it in the macro.

How to use this macro (click to expand/collapse)

When you have a display text (or Shell Script Results) window open, size it, then run this macro.
A Center next display text in window action will automatically be inserted above current macro’s selected action.

How to configure this macro (click to expand/collapse)

No configuration necessary

Disclaimer (click to expand/collapse)

TL;DR: I built it and it works for me. You can share/modify it how you want. But don't blame me if it doesn’t work for you :laughing:

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

2 Likes