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!

有帮助吗?

解决方案

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

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top