|
5#
楼主 |
发表于 2006-7-12 16:44:17
|
只看该作者
谢谢版主。
在Test forum找到一个贴子:QTP运行后锁键盘和鼠标。
Extern.Declare micLong, "BlockInput", "user32.dll", "BlockInput", micLong
' Use the following statement to lock keyboard and mouse input at the
' beginning of the test:
Extern.BlockInput 1
wait(5)
' Use the following statement to unlock keyboard and mouse input at the
' end of the test:
Extern.BlockInput 0
*******************************
'自己写了两个:
'例1:运行一个exe文件
Extern.Declare micLong, "WinExec", "kernel32.dll", "WinExec", micString,micLong
Extern.WinExec "d:\1.exe ", 1
'例2:Beep
Extern.Declare micLong, "Beep", "kernel32.dll", "Beep", micLong
Extern.Beep 500
'它让我的机器在办公室里狂响不止!
接下来要研究关于Click同时按下Ctrl键是否能用API来解决成功。 |
|