如何在vbscript中设置延迟 [英] How to set delay in vbscript

查看:42
本文介绍了如何在vbscript中设置延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 vbscript 中设置延迟?

How to set delay in vbscript?

WScript.Sleep(100) 不适用于 Windows XP、Vista.

WScript.Sleep(100) does not work on Windows XP, Vista.

推荐答案

为此而工作 (XP).

Work this end (XP).

创建一个新文件,命名为 test.vbs.把这个放进去.

Create a new file, call it test.vbs. Put this in it.

WScript.Sleep 1000
MsgBox "TEST"

运行它,注意消息框显示之前的延迟.

Run it, notice the delay before the message box is shown.

注意,数字以毫秒为单位,所以 1000 是 1 秒.

Note, the number is in Milliseconds, so 1000 is 1 second.

这篇关于如何在vbscript中设置延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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