The Execute JavaScript in Custom Prompt action (version 7.1+) allows you to execute a specified JavaScript in any active Keyboard Maestro Custom HTML Prompt.
The Execute JavaScript in Custom Prompt action is the functional equivalent for the Custom HTML Prompt to these actions:
The JavaScript may be from any of the following:
The JavaScript is executed in a specific Custom HTML Prompt action with a matching windowid, or all Custom HTML Prompts if no windowid is specified.
This Action can (optionally) return the results of the JavaScript:
If the results are to be saved to a variable or a clipboard then further text areas appear in the action allowing you to specify the variable or specific clipboard.
The JavaScript can access variables by using the window.KeyboardMaestro functions described in the Custom HTML Prompt action.