2009年7月8日 星期三

如何暫停Script,等待使用者按下任意鍵後才繼續

[VBScript]
strMessage = "Press the ENTER key to continue. "
Wscript.StdOut.Write strMessage

Do While Not WScript.StdIn.AtEndOfLine
Input = WScript.StdIn.Read(1)
Loop
WScript.Echo “The script is complete.”

[MS-DOS Batch file]
echo off
pause
echo The batch file is complete.

[REFERENCE]
How Can I Pause a Script and Then Resume It When a User Presses a Key on the Keyboard?

沒有留言: