Set HTML Window title from KM Variable
Would it be possible to set the window title from a KM Variable?
Countdown Timer.kmmacros (4.1 KB)
Set HTML Window title from KM Variable
Would it be possible to set the window title from a KM Variable?
Countdown Timer.kmmacros (4.1 KB)
Sure, you just set it with JavaScript in the HTML.
<script>
function KMInit() {
document.title = window.KeyboardMaestro.GetVariable("Whatever");
}
</script>
Can the variables be Local or Instance? They don't seem to work. Also, can they be tokens like TriggerValue - can't seem to get that to work either. Of course, I could create global variables and then access them... but that is very clutter-y.
thanks!
They should work according to @peternlewis:
If you still need help, please post the HTML for your HTML Prompt.
Ok, so I create the html window with this...
Thanks!
Another head scratcher...
If I run these separately, they work fine... but when I combine them in a single macro, the "Write to HTML Window" doesn't run.