SendKeys.SendWait()用法
2014-03-01 13:58
2086 查看
此方法是模拟键盘的,所以必须传入键盘数据。
此方法是模拟键盘的,所以必须传入键盘数据。
SendKeys.SendWait("{F5}"); //发送F5按键 SendKeys.SendWait("^s"); //发送 Ctrl + s 键 SendKeys.SendWait("%{F4}"); // 发送 Alt + F4 键 /*按键 代码 BACKSPACE {BACKSPACE}, {BS}, 或 {BKSP} BREAK {BREAK} CAPS LOCK {CAPSLOCK} DEL or DELETE {DELETE} 或 {DEL} DOWN ARROW {DOWN} END {END} ENTER {ENTER}或 ~ ESC {ESC} HELP {HELP} HOME {HOME} INS or INSERT {INSERT} 或 {INS} LEFT ARROW {LEFT} NUM LOCK {NUMLOCK} PAGE DOWN {PGDN} PAGE UP {PGUP} PRINT SCREEN {PRTSC} RIGHT ARROW {RIGHT}
SendKeys.SendWait("+{TAB}");
SendKeys.SendWait("%f");//alt+f SendKeys.SendWait("{Tab}"); SendKeys.SendWait("{Enter}")
多次按键的代码
为了指定重复键,使用 {key number} 的形式。必须在 key 与 number 之间放置一个空格。例如,{LEFT 42} 意指 42 次按下 LEFT ARROW 键;{h 10} 则是指 10 次按下 H 键。
相关文章推荐
- SendKeys.SendWait()用法
- SendKeys.SendWait()用法
- SendKeys.SendWait()BUG解决方法
- C# - The differences between SendKeys.Send and SendKeys.SendWait
- C# SendKeys.SendWait的一个技巧
- winform模拟键盘操作SendKeys.Send()与SendKeys.SendWait()
- SendKeys.SendWait
- C# SendKeys.SendWait 方法和SendKeys.Send 方法区别
- 模拟键盘输入就是使用SendKeys.Send(“汉字”)与SendKeys.SendWait(“字母”)实现的
- SendKeys.SendWait 方法
- 线程中CreateEvent和SetEvent及WaitForSingleObject的用法
- 线程中CreateEvent和SetEvent和ReSetEvent及WaitForSingleObject的用法
- CreateEvent/OpenEvent/SetEvent/ResetEvent/WaitForSingleObject 相关用法说明
- 线程中CreateEvent和SetEvent及WaitForSingleObject的用法
- WebDriverWait 中 and, or, not用法
- SendKeys.Send 方法
- Rails中 Send 和respond_to用法
- WaitForSingleObject的用法
- pthread_cond_wait()用法分析
- C#SendKeys用法