@peternlewis It appears to me that a specific AppleScript is not returning the result when using window.KeyboardMaestro.ProcessAppleScript() in this Custom HTML Prompt.
AppleScript:
tell application "Keyboard Maestro Engine" to get name of variables
Custom HTML Prompt:
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
function doTest() {
const test = window.KeyboardMaestro.ProcessAppleScript(
'tell application "Keyboard Maestro Engine" to get name of variables');
console.log(`Result: ${test}`);
document.getElementById("results").innerText = "Result: " + test;
}
</script>
</head>
<body data-kmwindow="400, 290">
<div>
<button type="button" onclick="doTest()">Test</button>
</div>
<div id="results" style="height: 100%">
</div>
</body>
</html>
Am I doing something wrong? Thanks,