我最近开始编码,而且我的表现相当不错。但我遇到了一个我似乎不知道如何解决的错误。有人可以帮忙吗?代码是 -
color 0a
@echo off
echo (Name Later) Activating
echo Wscript.Sleep 5000>C:sleep5000.vbs
echo Wscript.Sleep 3000>C:sleep3000.vbs
echo Wscript.Sleep 4000>C:sleep4000.vbs
echo Wscript.Sleep 2000>C:sleep2000.vbs
start /w wscript C:sleep2000.vbs
echo Testing
start /w wscript C:sleep2000.vbs
echo Troll
start /w wscript C:sleep2000.vbs
:A
cd C://ProgramFiles(86x)/Google/Chrome/Application
start chrome.exe
start www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF- 8#q=Halp+me+I+am+gunna+die
start /w wscript C:sleep4000.vbs
我做错了吗?如果有机会,请告诉我!
答案 0 :(得分:0)
如果使用timeout命令,则无需编写vbscript来执行sleep命令:
@Echo Off
Color 0A
Set CP="%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe"
Set WS=www.google.com/webhp?sourceid=chrome-instant
Set WS="%WS%&ion=1&espv=2&ie=UTF-8#q=Halp+me+I+am+gunna+die"
Echo (Name Later) Activating
Timeout/T 2 >Nul
Echo Testing
Timeout/T 2 >Nul
Echo Troll
Timeout/T 2 >Nul
:A
Start "" %CP% %WS%
Timeout/T 4 /NoBreak>Nul