记录键盘操作可以用set和presskey方法,而type方法是不记录的。type方法主要用于输入连接文本字符串和键盘修饰键(组合键),组合键之间用&符号。
如:JavaWindow("Shell").JavaEdit("授权用户").Type "hello" & micreturn
edit文本框输入内容后按回车键:JavaWindow("Shell").JavaEdit("授权用户").Type micreturn
type方法常用的按键常量有以下:
micRShiftUp | Releases the right Shift key |
micreturn | Press the enter key |
micTab | Press the tab key |
micWinLogoDwn | Press the windows Logo key |
micWinLogoUP | Release the windows Logo key |
micLWinLogoDwn | Press the left windows logo key |
micLWinLogoUp | Release the left windows logo key |
micRWinLogoDwn | Press the right windows logo key |
micRWinLogoUp | Release the right windows logo key |
micF1 | Press the F1 key |
micCtrlDwn | Press the ctrl key |
micCtrlUp | Release the ctrl key |