HTML prompts stopped working with Sierra

Yes, I understand what you mean. But you can get something working by doing something like this:

HTML Prompt Test.kmmacros (3.1 KB)

<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="utf-8" />
        <script type="text/javascript">
            function KMWindow() {
                document.getElementById("ωMyTmp").value = window.KeyboardMaestro.GetVariable("ωMyTmp");
            }

            function submitWindow(result) {
                window.KeyboardMaestro.SetVariable("ωMyTmp", document.getElementById("ωMyTmp").value);
                window.KeyboardMaestro.Submit(result);
            }

        </script>
    </head>

    <body>
        <form>
            <p>
                <label class="label">Set Variable:
                    <input id="ωMyTmp" name="ωMyTmp1" type="text" autofocus>
                </label>
            </p>
            <div>
                <button name="OK" class="button-default" onclick="submitWindow('OK')">OK</button>
            </div>
        </form>
    </body>

</html>
1 Like