Question

I've been trying to figure out how to get multiple key strokes with a single command. The goal is to have an effect like:

SendKeys.Send({"TAB"}{"TAB"}{"ENTER"}{"TAB"}{"ENTER"}{"TAB"}{"ENTER"});

I've been able to get two key strokes to work such as

SendKeys.Send(^{"TAB"}) 

However this is press and hold control + press tab. The goal I want is not to hold down a key then press, but to have the button press register multiple times. Thank You!

Était-ce utile?

La solution

SendKeys supports sending multiple keys. Why are you using incorrect syntax there? It should really be like:

SendKeys.Send("{TAB}{TAB}{ENTER}{TAB}{ENTER}{TAB}{ENTER}");

Autres conseils

Try using SendWait instead

SendKeys.SendWait("{TAB}{TAB}{ENTER}{TAB}");

This will ensure each keystroke is processed first before sending the next and seems to have the desired effect

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top