To send keystrokes from an alias I use the following code:
alias sendkeys {
var %object = sendkeys $+ $ticks
.comopen %object WScript.Shell
if ($com(%object)) { .comclose %object $com(%object,SendKeys,3,bstr,$1-) }
}
e.g. sendkeys % $+ r will open the scripts editor
The following code in my dialog works for me:
on 1:dialog:myDialog:*:*: {
if (($did == 1) && ($devent == sclick)) { echo -a you clicked button1 }
if (($did == 2) && ($devent == sclick)) { run notepad }
}
But this code does not perform as I would wish.
on 1:dialog:myDialog:*:*: {
if (($did == 1) && ($devent == sclick)) { sendkeys % $+ r }
}
How can I make it work?