Time Limit for "Display Results in a Window"

Actions that use "display results in a window" produce a persistent window. Is there a way to set a limit for the length of time these are displayed?
Why: If I step away for a bit, these windows start to pile up from timed actions. When i return, each window then needs to be brought to the front and "OK" to be clicked to close it.
I have been adding two actions (a pause and click "OK") after each display action to accomplish this, but I wonder if I'm missing some hidden feature that sets a time limit.

If you want to control a given window you'll probably want to use a sub-macro with a pause-until action with a calculation-condition.

There is no timeout for a display-text action.

-Chris

Two other choices in the same sub-menu -- "display results briefly" and "display results large" have timeouts. It's the "display results in a window" option that doesn't have a timeout.
Maybe @peternlewis could consider adding one, especially because the floating windows stay in front of the rest of the windows until closed by user action.
Meanwhile, I have a workaround using additional actions, along the lines that you suggested. Thx.

1 Like

The other two are designed to be limited in time, display results briefly by its definition, and display results large for obvious reasons.

The display results in a window is designed to display the text for copying, viewing, and generally for human consumption. There isn't any timeout because there is not any way to set the timeout. The macro does not wait around for the window, it is displayed, left displayed, and the macro moves on.

Got it. I ended up rolling my own using this Javascript in a KM Action:

app = Application.currentApplication()
app.includeStandardAdditions = true
result = Application("Keyboard Maestro Engine").getvariable("Result");
app.displayDialog(result, {buttons: ['Ok'], givingUpAfter: 15})

The resulting display is not as clean as the display results in a window option of the KM action, but it gives me the time limited display I was looking for.

1 Like

Hi @shiva88kr,

I just made a macro using the Custom HTML Prompt. The Custom HTML Prompt allows more customized styles.

Here is the link:

3 Likes

Nice one @martin !
Two-for-one special -- solved my time-limited display issue elegantly AND introduced me to the "Custom HTML prompt" action.
Marking yours as the Solution

1 Like