Skrip Posted December 17, 2007 Share Posted December 17, 2007 In a bat script, how to you make it pause for 0.5 seconds, then continue? [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
jokke Posted December 17, 2007 Share Posted December 17, 2007 (edited) Here's a way of sleeping your scripts, but there are a sleep.exe witch is possible to download from MS. Or you could create one. Inn this example it sleeps 10 sec's. PING -n 10 127.0.0.1>nul Edited December 17, 2007 by jokke UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
Nevin Posted December 17, 2007 Share Posted December 17, 2007 Ping the loopback? haha, creative. Link to comment Share on other sites More sharing options...
jokke Posted December 17, 2007 Share Posted December 17, 2007 (edited) Heres something simple: command line parameter: sleep for 500 ms: scriptname.exe/au3 ms "500" sleep for 10 secounds: scriptname.exe/au3 s/sec/secound "10" If UBound($CmdLine) > 0 Then Switch $CmdLine[1] Case "ms","MS" Sleep($CmdLine[2]) Case "sec","secound","s" Sleep($CmdLine[2]*1000) Case "min","minute","m","minutes" Sleep($CmdLine[2]*1000*60) Case "hour","h","hours" Sleep($CmdLine[2]*1000*60*60) EndSwitch EndIf oops i did fail to check if it did work as intended though, and have a slight feeling it wont work as it should. After checking it, the script itself works but whitout effect on my bat file Edited December 17, 2007 by jokke UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
Skrip Posted December 17, 2007 Author Share Posted December 17, 2007 Here's a way of sleeping your scripts, but there are a sleep.exe witch is possible to download from MS. Or you could create one. Inn this example it sleeps 10 sec's. PING -n 10 127.0.0.1>nulAh ha! I never would have thought of that. Thank you. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now