Call A Macro By Click Within A Prompt

Hi guys, is this possible?
On a html prompt, click an element which will call one Macro?

I’v put a Macro’s javascript trigger code in prompt’s html, but it seems the script trigger
can be only run if it’s within an independent/special action.

Would appreciate all help…

You should be able to using this JavaScript:
window.KeyboardMaestro.Trigger( macro, value )

Custom HTML Prompt action (KM Wiki)

1 Like

Thanks JMichaelTx, now I have an alternative way arrange and run Macros besides pallete.

1 Like

You're welcome, and thank you for the great video which shows how to implement this feature.

Thanks again for the video, which is great.

Would you mind posting your Macro which uses the HTML Prompt that triggers the macro? I'm sure it would be a big help to many others, including myself. (3.7 MB) (4.5 MB) (127.1 KB) (1.8 MB) (3.9 MB) (4.3 MB) (534.4 KB)
I split the file into small zip parts and uploaded them here; :slight_smile:

Thanks, but it would be much easier to download and view if you would just upload the actual macro file (no need to zip) as one file.

Thanks JT I saw the share button on KM.

It's my 1st shared Macro it's simple so pls don't laught at it. :slight_smile:

The onmouse enter|over will "malfunction" after the prompt window is not active for one time. So I made a 2nd Macro, which mission is solely checking the prompt's status, by pixel color or mouse location. ( if a user move the cursor onto the prompt, then close the prompt and relaunch it. )

1 Like