Jump to content

Pause for x amount


Skrip
 Share

Recommended Posts

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 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

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 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

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
Ah 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...