The Execute JavaScript in Custom Prompt action allows you to execute a specified JavaScript, either from a file or text within a currently open Custom HTML Prompt. The JavaScript is executed in all Custom HTML Prompt action with a matching windowid, or all if no windowid is specified. The JavaScript can return results. Options for the results of a JavaScript results are:
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.