MACRO: Custom HTML Prompt with Dynamic Size and Position
(I was working on this for myself, and thought I might as well post it).
Combining several things I've learned over the past few months, this is a stripped-down example of how to create a Custom HTML Prompt that does the following:
- Saves/Restores its position, so it will show in the same position on the screen as the last time you used it.
- NOTE: Exiting the prompt by pressing the Escape key does NOT save the position.
- Specify the Width and Height of the prompt using KM variables.
Dynamically sets the HTML "body" style to values that work with the Width and Height.
There's only one place to change the values, making it easy to keep everything in sync.
Easier for Users to change the width and height, if needed, rather than digging through HTML and css code.