MSFN Forum: Count down in a batch file - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Count down in a batch file Rate Topic: -----

#1 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 03 December 2004 - 02:57 AM

hi
is it posible to have a visible Count down in a batch file
what i mean is this:
this window closes in 5 seconds, and it Counts down visible
:)


#2 User is offline   army20 

  • MCSA, MCDST, MCTS (vista), A+ (2003)
  • PipPipPipPip
  • Group: Members
  • Posts: 522
  • Joined: 01-September 04

  Posted 03 December 2004 - 04:00 AM

Removed

#3 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 03 December 2004 - 04:46 AM

Sorry to say this but it doesed work over here
and i did use CLS

#4 User is offline   jdoe 

  • Advanced Member
  • PipPipPip
  • Group: Banned
  • Posts: 314
  • Joined: 02-May 04

Posted 03 December 2004 - 11:40 AM

sixpack, on Dec 3 2004, 03:57 AM, said:

hi
is it posible to have a visible Count down in a batch file
what i mean is this:
this window closes in 5 seconds, and it Counts down visible
:)


You again :P

With all those questions about batch file you had lately, you're going to raise your knowledge.

Don't forget search button and Google are your friend and reading others batches can help a lot either.


5 seconds countdown
@echo off
echo this window closes in 5 seconds
echo.
echo 5
ping -n 2 127.0.0.1>nul
echo 4
ping -n 2 127.0.0.1>nul
echo 3
ping -n 2 127.0.0.1>nul
echo 2
ping -n 2 127.0.0.1>nul
echo 1
ping -n 2 127.0.0.1>nul

pause



:)

#5 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 03 December 2004 - 12:17 PM

jdoe, on Dec 3 2004, 06:40 PM, said:

sixpack, on Dec 3 2004, 03:57 AM, said:

hi
is it posible to have a visible Count down in a batch file
what i mean is this:
this window closes in 5 seconds, and it Counts down visible
:)


You again :P

With all those questions about batch file you had lately, you're going to raise your knowledge.

Don't forget search button and Google are your friend and reading others batches can help a lot either.


5 seconds countdown
@echo off
echo this window closes in 5 seconds
echo.
echo 5
ping -n 2 127.0.0.1>nul
echo 4
ping -n 2 127.0.0.1>nul
echo 3
ping -n 2 127.0.0.1>nul
echo 2
ping -n 2 127.0.0.1>nul
echo 1
ping -n 2 127.0.0.1>nul

pause



:)

COOL jdoe i had only:
ping -n 5 127.0.0.1>nul

so i did know but not all

only i did not know that i can use it this way ;)

btw believe me i use googel and when i do not find it i ask here

#6 User is online   gunsmokingman 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,991
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 14 December 2004 - 02:50 AM

I am not a coder but here what i worked out.
echo off
cls && mode con: Cols=55 Lines=5 && Color 9f && TITLE COUNTDOWN
 > Rest1.vbs Echo Wscript.sleep 875 && SET R1=Start /w Rest1.vbs
CLS
ECHO. && Echo .5 && ECHO COUNTDOWN 5 >> Test.txt && %R1% && CLS && ECHO. && Echo ..4 && ECHO COUNTDOWN 4 >> Test.txt &&  %R1% && CLS
ECHO. && Echo ...3 && ECHO COUNTDOWN 3 >> Test.txt &&  %R1% && CLS && ECHO. && ECHO ....2 && ECHO COUNTDOWN 2 >> Test.txt &&  %R1%
CLS && ECHO. && ECHO .....1 && ECHO COUNTDOWN 1 >> Test.txt &&  %R1% && CLS && COLOR F2
ECHO. && ECHO  CONTINUE >> Test.txt
SET /P = CONTINUE
DEL REST1.VBS && Test.txt
DEL Test.txt


#7 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 14 December 2004 - 01:44 PM

gunsmokingman, on Dec 14 2004, 09:50 AM, said:

I am not a coder but here what i worked out.
echo off
cls && mode con: Cols=55 Lines=5 && Color 9f && TITLE COUNTDOWN
 > Rest1.vbs Echo Wscript.sleep 875 && SET R1=Start /w Rest1.vbs
CLS
ECHO. && Echo .5 && ECHO COUNTDOWN 5 >> Test.txt && %R1% && CLS && ECHO. && Echo ..4 && ECHO COUNTDOWN 4 >> Test.txt &&  %R1% && CLS
ECHO. && Echo ...3 && ECHO COUNTDOWN 3 >> Test.txt &&  %R1% && CLS && ECHO. && ECHO ....2 && ECHO COUNTDOWN 2 >> Test.txt &&  %R1%
CLS && ECHO. && ECHO .....1 && ECHO COUNTDOWN 1 >> Test.txt &&  %R1% && CLS && COLOR F2
ECHO. && ECHO  CONTINUE >> Test.txt
SET /P = CONTINUE
DEL REST1.VBS && Test.txt
DEL Test.txt

works nice i'l be useing yours then ;)
thanks

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy