Auto-Close Display Text Prompt Macro (v9.2) [v1.3.1 and v2.3.1]

Last Updated (09/15/2021, 09:03 PM ET)

v1.1: added a "Reload Text" button. When variable changes, you may click the Reload Text button to reload its value.

v1.3 note: allows users to set the window size.
v1.3.1 note: add resizing the text box as users resize the window.

Update (09/15/2021, 09:02 PM ET):

v1.2 note: Replaced the "Reload Text" button with an "Auto Reload" function. It reloads every 1s.

  • This version does not replace v1.1, as some people might prefer a manual reload button.
  • To download v1.2, go to this post

v2.3 note: allows users to set the window size. Upgraded version number to 2.3 for better version management.

v2.3.1 note: add resizing the text box as users resize the window.


See screenshot below for notes.

Result Example:

2021-09-15 11-19-36.2021-09-15 11_20_15

Macro for download:

Auto-Close Display Text Prompt.kmmacros (9.8 KB)

Macro Image:

5 Likes

Update (09/15/2021, 11:21 AM ET):

  • v1.1: added a "Reload Text" button. When variable changes, you may click the Reload Text button to reload its value.

See OP.

Last Update (09/15/2021, 09:02 PM ET):

v1.2 note: Replaced the "Reload Text" button with an "Auto Reload" function. It reloads every 1s.
・This version does not replace v1.1, as some people might prefer a manual reload button.
v2.3 note: allows users to set the window size. Upgraded version number to 2.3 for better version management.
v2.3.1 note: add resizing the text box as users resize the window.


Result:

2021-09-15 11-53-59.2021-09-15 11_54_18

Macro file:

Auto-Close Display Text Prompt_Auto-Reload.kmmacros (10.7 KB)

Screenshot:

Hey @martin!

This one is awesome!

The only thing is to how to define position of a window on a screen?

since it's html, position, the window coordinates, can be defined.
ie. search the forum for the Napkin macro or other prompts

Hi @kreal,

I'm glad you like it. I've updated the macros to 1.3 and 2.3 respectively.

They now

  1. allow users to define the window size.
    • note: this action is disabled. If you want to define the window size, please activate the action and give the ==width== and ==height== of the window, separated by a comma ==,== without any space.
  2. the window will show up at the upper-right corner of the front screen.

Hi @peternlewis,

I have one problem with this macro. ==The user-defined window size does not work reliably.== Sometimes, the JavaScript seems to have failed to get the value of instanceWindowSize and as a result the window size is defined by my default value.

See my gif below. The user defined window size is 700,400, and the default size is 540,300. when the cursor flashes, it means I was executing the same macro multiple times without any changes.

I tried to add up to 1s of pause after the setting instanceWindowSize value action. It did not solve the problem.

2021-09-15 15-16-38.2021-09-15 15_17_12