I have a very simple test macro, but clearly (after exploring forum and wiki), I'm missing something: I want to replace the entire contents of the
<body> section of an HTML document with data stored in a KM variable:
html test window.kmmacros (3.0 KB)
Help and thanks;
There's an action just for that. Here's an example of how I used it, starting with giving the
Custom HTML Prompt window and ID:
<body data-kmwindow="SCREENVISIBLE(Main,Right)-400,SCREEN(Main,Top,10%),320,300" data-kmwindowid="Ingest Window">
That's referenced in the action:
div "msg" elsewhere in the window gets replaced with the quoted text in the action.
I’m probably dense, but I’m trying to figure out how to make the bit in your second step reference a KM variable. I can replace all the text just fine with other text, but I don’t know the syntax to use when the replacement text is a KM variable.
Something like this:
document.getElementById('msg').innerHTML = window.KeyboardMaestro.GetVariable( 'LocalVol' );