I was wondering how to send spacebar key using SendKeys.send();
It works with the other keys but only the spacebar !!
Per the documentation you linked, SendKeys.send(" "); will send a space key.
The only keys which require special codes are "characters that aren't displayed when you press a key".
A normal space with double quotes works SendKeys.SendWait(" ")
...but if you are sending characters as Char instead of String as the arguments make sure to replace the Char space with a String space.
if (chr == ' ')
{
SendKeys.SendWait(" ");
}else{
SendKeys.SendWait("{"+chr+"}");
}
Use application.sendkeys "{SPACE}"
加载中,请稍侯......
精彩评论