只问耕耘
meteorm
全部博文(519)
2016年(1)
2013年(5)
2011年(46)
2010年(220)
2009年(51)
2008年(39)
2007年(141)
2006年(16)
yixin202
思流stre
yhd1120
万王之王
cindyyu
jianghon
gaokeke1
格伯纳
cynthia
分类: WINDOWS
2007-08-29 09:55:16
Suspends script execution for a specified length of time, then continues execution.
object.Sleep(intTime)
The thread running the script is suspended, releasing its CPU utilization. Execution resumes as soon as the interval expires. Using the Sleep method can be useful when you are running asynchronous operations, multiple processes, or if your script includes code triggered by an event. To be triggered by an event, a script must be continually active (a script that has finished executing will certainly not detect an event). Events handled by the script will still be executed during a sleep.
Passing the Sleep method a 0 or –1 does not cause the script to suspend indefinitely.
The following example demonstrates the use of a single .wsf file for two jobs in different script languages (VBScript and JScript). The functionality of both jobs is the same — each runs the Windows calculator and sends it keystrokes to execute a simple calculation.
上一篇:批处理延时Wscript.Sleep()
下一篇:使用ASP订制自己的XML文件读写方法
登录 注册