Frage

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!

War es hilfreich?

Lösung

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}");

Andere Tipps

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top