September 19, 200421 yr Hi guys. Was wondering if I can get it to put text up with a color, then sleep for .5 seconds or 1 second, then switch colors...over and over. Any help? thanks! I want my batch file to look really great. Thanks!
September 19, 200421 yr Author tried it......sleep minimum is 1 second, and its too long to flash...i tried .5 but it didnt work any ideas?
September 19, 200421 yr Copy the code below in a file called SLEEP.VBS and it will take milliseconds. Look at the other code to see how to write your batch with it. It's strange what you wanna do but this is a solution.SLEEP.VBSIf WScript.Arguments.Count = 1 Then WScript.Sleep WScript.Arguments(0)End IfBATCH FILECOLOR 07SLEEP.VBS 500COLOR 70SLEEP.VBS 500COLOR 07SLEEP.VBS 500COLOR 70SLEEP.VBS 500COLOR 07
September 19, 200421 yr You need to call the VBS with "wscript" or "cscript" to be sure it will run.And that will take up more time than just the 0.5 seconds you want it to. Just sticking to what's scriptable right within the batch-files sounds better.One option is to ping 127.0.0.1 for as many times (or milli-secs) as needed to wait. That way, no sleep.exe or VBS is needed. Of course, the COLOR command is simple enough, use it after the inter-mittent pings.
Create an account or sign in to comment