Hi,
My purpose is:
- Let the Custom HTML Prompt get the saved variable value and put it in the "Input" box as the default input.
- Highlight this default input, so that I may start typing immediately, replacing the default input.
I'm stuck at step 2.
For now, I use the "Execute a macro" Asynchronously action to type the "Tab" key to accomplish it. But I want to be able to do it with javascript without executing another macro asynchronously.
Is it possible?
I tried the element.select() function in KMInit(). It does not work.
Here is my test code:
<html>
<head>
<script>
function KMInit() {
document.getElementById("myid").select();
}
</script>
</head>
<body>
<div><input type="text" id="myid" name="LocalName" autofocus/></div>
</body>
</html>
I have a "set variable value" action before the Custom HTML Prompt to simulate the default input value:

My goal is to automatically highlight the "default input" string:

But now, it looks like this:
