Shell里的两种运行模式

上一篇 / 下一篇  2007-04-26 13:47:55 / 个人分类:QTP

Set ōbjShell = CreateObject("Wscrīpt.Shell")
myrun = objShell.Run("ping 127.0.0.1",,True) ‘1
myrun = objShell.Run("ping 127.0.0.2",,True) ‘2

Set ōbjshell = nothing

Set ōbjShell = CreateObject("Wscrīpt.Shell")
myrun = objShell.Run("ping 127.0.0.1") ‘3
myrun = objShell.Run("ping 127.0.0.2") ‘4

Set ōbjshell = nothing

这两种是有差别的,上面的方法等第一句执行完了才执行第二句,能够看到其执行步骤,而不是一闪就过,下面的这种方法同时执行这两句命令,一闪即过

WshShell.SendKeys "^(ec)" 与 WshShell.SendKeys "^ec"的区别,后者表示组合按键是同时按住CtrlE键,然后松开Ctrl键,单独按下“C”字母键;前者表示按下CTRL的同时按下E、C键


TAG: QTP

 

评分:0

我来说两句

我的栏目

日历

« 2024-03-23  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 10802
  • 日志数: 17
  • 文件数: 1
  • 建立时间: 2007-01-27
  • 更新时间: 2007-10-24

RSS订阅

Open Toolbar