MACRO: Execute Dynamic Javascript in Browser

Execute Dynamic Javascript in Browser

REQUIRES KM version 10+

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:

2022-02-09_06-35-01

 
Or more simply:

2022-02-09_06-35-01

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:

  • Execute Dynamic Javascript in Custom HTML Prompt
  • Execute Dynamic Javascript in Front Browser
  • Execute Dynamic Javascript in Google Chrome
  • Execute Dynamic Javascript in Safari

Execute Dynamic Javascript in Browser.v1.0.kmmacros (44.6 KB)

3 Likes

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. :grin:

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. :rofl:

2 Likes

@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!!!

:grinning:

3 Likes

LOL. Same with my woodworking YouTube channel - I like to make things to help make things.

1 Like

I just hope you know how much we appreciate you @DanThomas. Your tools are fabulous.

Thank you!

KC

3 Likes