Batch window opens and shuts immediately? -
i have code in batch file, when open it, closes immediately. do? should work without adding pauses.
@echo off color f0 :start1 cls set /a wait=50000 set /a limit=2147483646 set /a current=0 echo waiting room simulator 2014 echo current number:%current% echo number 2,147,483,647 goto loop1 :loop1 set /a wait=%wait%-50000 set /a current=%current%+1 if current=limit goto pause1 goto start2 :loop2 set /a wait=%wait%+1 if %wait%=50000 goto loop1 :start2 cls echo waiting room simulator 2014 echo current number:%current% echo number 2,147,483,647 goto loop2 :pause1 goto pause2 :pause2 goto pause1
seems have problem syntax, if current=limit goto pause1 , if %wait%=50000 goto loop1 see fixed file below:
@echo off color f0 :start1 cls set /a wait=50000 set /a limit=2147483646 set /a current=0 echo waiting room simulator 2014 echo current number:%current% echo number 2,147,483,647 goto loop1 :loop1 set /a wait=%wait%-50000 set /a current=%current%+1 if %current%==%limit% goto pause1 goto start2 :loop2 set /a wait=%wait%+1 if %wait%==50000 goto loop1 :start2 cls echo waiting room simulator 2014 echo current number:%current% echo number 2,147,483,647 goto loop2 :pause1 goto pause2 :pause2 goto pause1 batch-file window
No comments:
Post a Comment