锁定计算机(QTP 11.0)后,脚本失败.是否有任何解决方法? [英] Script fails when the computer is locked (QTP 11.0) .Is there any workaround?

查看:69
本文介绍了锁定计算机(QTP 11.0)后,脚本失败.是否有任何解决方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用QTP 11.0. 当我运行脚本时以及在两次锁定之间(如果计算机被锁定),脚本都会失败.是否有任何解决方法?

I use QTP 11.0. When i run a script and in between if computer gets locked, the script fails.Is there any workaround?

预先感谢...

推荐答案

这可能是一种懒惰的方法.但是实际上它是有效的.将以下代码另存为vbs文件,并在执行前对其进行两次双击.

It might be a lazy way.. But actually it works.. Save the below code as vbs file and double clik on it before execution.

do
set w=createobject("Wscript.shell")
w.sendkeys "{NUMLOCK}"
wscript.sleep 5000
loop

它只会按Numlock,直到您停止脚本为止.

It will simply press Numlock , until you stop the script.

这篇关于锁定计算机(QTP 11.0)后,脚本失败.是否有任何解决方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆