Society of Robots - Robot Forum
Software => Software => Topic started by: cooldog on February 26, 2008, 09:07:07 PM
-
okay so i wrote this fun little code for my computer
@echo off
cls
pause
cls
echo why did the chicken cross the road...?
color 0a
pause
cls
echo any suggestions...
color 0a
pause
cls
echo to get to the other side
color 0a
pause
cls
:loop
echo hahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha
color 0a
goto loop
just something fun
you see how it has pause written in it, that Makes it stop until i push a button... so is there anyway to make it pause for a certain time like 3 seconds then continue
-
delay? cycles, times, etc
-
no theres no built in method for it.
look here: http://www.computerhope.com/batch.htm
-
You also dont have to do the "color 0a" more than once in the code. Once its there, its there.
add this under @echo off: "Title Really good joke" minus the quotes
-
ping 127.0.0.1 -n 2
i found this at
http://www.robvanderwoude.com/wait.html
it works okay for a delay but when it is delaying it shows up on screen it doesn't stay hidden any ideas
-
try "pause". it will wait for a keystroke.
-
you see how it has pause written in it, that Makes it stop until i push a button... so is there anyway to make it pause for a certain time like 3 seconds then continue
-
hmm, right.
Well, if you want, I can make you a little C++ program that you can run from your batch list, and you'll pass it an argument in ms - the delay.
it will look something like this:
holdon 400
echo something
holdon 2500
echo something else
-
Second file under "DOS"
http://www.computerhope.com/dutil.htm
-
okay so i loaded it... but can't get it to work
instead of pause i tryed
sleep 20
sleep.exe 20
sleep20
but non of them work
-
did you try pointing to the absolute path
c:\mydocs\mybats\sleep.exe 20
Also try running it from a command prompt directly to see if it works and any error codes, You can also try querying it this way too sleep.exe /? usually brings up instructions if they have been programmed accordingly. Also it may be the case that if you are using xp/vista then it just might not work for you