This macro is basically the same as the "Execute Javascript in Browser" action, except you can pass the JavaScript in a variable, which means you can build the JavaScript on the fly.
Supports the same targets as "Execute Javascript in Browser":
Custom HTML Prompt
Google Chrome
Safari
Front Browser
EXAMPLE:
Or more simply:
INSTALLATION:
Download and double-click the .kmmacros file. Don't forget to enable the macro group and/or macros.
CONTENTS:
Macro
Description
Example
Example macro
Execute Dynamic Javascript in Browser
The macro that does all the work
These macros are simplified ways of calling the main macro:
I don't have a clue what I would use this for (since my knowledge of JavaScript can fit into a thimble), but it seems very useful. So I'm gonna bookmark this for a later day.
LOL, I get it. I didn't know what I would ever use something like this before either, until now. I'm working on some code that will allow me to run a macro from a Custom HTML Prompt, and get a response back like you would think you could but can't, least in the normal way, anyway. If that makes any sense. If not, then never mind.
@DanThomas never retired. Instead of making tools for developers, he pivoted to making tools for the less fortunate and needy. Now he is pivoting into making tools that we will need in the future… and yet we don’t even know when we will need them. What a guy!!!