
- 帖子
- 63
- 积分
- 15
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2014-9-11
|
[问题求助] 求助vbs循环执行指定秒数后停止工作的代码没有正常循环是什么原因
本帖最后由 pcl_test 于 2016-9-13 20:10 编辑
老师节日好!!
以下123.VBS 如下,只运行了一次循环体就停止工作,而不是循环执行160秒后停止工作,不知错在何处请指教?
谢谢!!
123.VBS:- Dim strPrgpth
- strPrgpth = """e:\工具\武侠.exe"""
- Set wshshell = CreateObject("wscript.shell")
- Set oexec = wshshell.exec(strPrgpth)
-
- t=timer
- do while timer-t<160
-
- wscript.sleep 1000
- wshshell.Sendkeys "{ENTER}"
- wscript.sleep 30000
- wshshell.Sendkeys "{ENTER}"
- process.Terminate
- loop
复制代码
|
|