This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
action:Execute_a_JavaScript_in_Custom_Prompt [2016/04/27 04:06] peternlewis |
action:Execute_a_JavaScript_in_Custom_Prompt [2017/08/31 02:10] peternlewis |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | The Execute JavaScript in Custom Prompt action(7.1+) 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](https://wiki.keyboardmaestro.com/action/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: | + | ~~REDIRECT>actions: Execute_a_JavaScript_in_Browser~~ |
- | + | ||
- | *ignore results. | + | |
- | *display results in a window. | + | |
- | *display results briefly. | + | |
- | *display results large. | + | |
- | *type results. | + | |
- | *paste results. | + | |
- | *save results to variable. | + | |
- | *save results to the system clipboard or a named clipboard. | + | |
- | *save results asynchronously — the action runs while the macro continues on. | + | |
- | + | ||
- | 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](https://wiki.keyboardmaestro.com/action/Custom_HTML_Prompt) action. | + | |