SystemUtil.Run file,[params],[dir],[op],[mode]
"file" 必须的,是你想要运行的文件的名称。
"params" 可选,如file参数中指定的是可执行文件,则可使用params参数来指定该可执行文件的运行参数。
"dir" 可选,应用程序或文件的默认目录。
"op" 可选,将要被执行的动作。如果该参数值为空,则默认操作为open操作。
"mode" 可选,指定应用程序打开时的显示模式。可以指定以下几种打开模式。默认模式是1。
表示没明白op mode的用法 只知道前三个
SystemUtil.Run 打开某个程序
例:SystemUtil.Run "notepad.exe","a.txt","C:\Users\rtyrrty\Desktop" 使用记事本打开桌面a.txt文件
SystemUtil.CloseDescendentProcesses 关闭Qtp打开的所有程序
SystemUtil.CloseProcessByName 关闭指定名称的进程
例: SystemUtil.CloseProcessByName "iexplore.exe" 关闭IE
脚本执行过程中将会避免键盘和鼠标的输入与点击干扰,为避免干扰在脚本前后加上如下两句
SystemUtil.BlockInput '锁住键盘和鼠标
SystemUtil.UnblockInput '解锁