MACRO: Custom HTML Prompt with Dynamic Size and Position

MACRO: Custom HTML Prompt with Dynamic Size and Position

(I was working on this for myself, and thought I might as well post it).

Custom HTML Prompt with Dynamic Size and Position.kmmacros (5.9 KB)

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:

  1. 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.
  1. 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.

4 Likes

Dan! You must stop this! My hard drive is nearly full from downloading all of your Macros. I’ve had to hire an assistant just to keep up with this. LOL

Another great macro from Dan the Macro Man! :thumbsup:
I’m adding this to the “Best Macros List”.

LOL. Get used to it. This is what I do. I used to do it for a living. I’ve always been the “tools guy”.

Whenever I find myself saying “there’s got to be an easier way - hasn’t anyone done this before me?”, I figure that once I figure out how to do it, I may as well document it for others.

It’s actually kind of an obsession for me - almost OCD-like. You could probably tell. :slight_smile:

Please don’t make me stop! Please!! :wink:

1 Like

I've been talking to myself over on this post, which takes advantage of KM 8's resizable windows.

Awesome!!