Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I want to how use it "timeout" command
and if I can cancel timeout command while counting action or I must wait to it done?

Timeout /t 20

Tank you

What I have tried:

I have tried any options ,but no success
Posted
Updated 17-Sep-19 6:29am
v2
Comments
Vincent Maverick Durano 4-Apr-19 17:48pm    
Timeout command of what?

If you're talking about the "timeout" command you see in the CMD Prompt, just type "timeout /?" for the help on it.

The timeout command will wait for the entire time you specify, or, by default, any key press to quit early. You cannot skip the timeout from another command in the batch file.
 
Share this answer
 
Comments
MasterGamerFX 6-Apr-19 14:05pm    
ok there is an alternative commands except the "timeout" command that i can control of them?

tnk
Dave Kreskowiak 6-Apr-19 14:08pm    
There is nothing that you can use that is built in that allows you to wait until some "action" (you never said what) occurs.

Without a much better description of what you're really trying to do, it's impossible to tell you anything useful.
MasterGamerFX 6-Apr-19 16:22pm    
ok
i tried to do something like to .
such as timer with interval to do x time with as 20 seconds each time
and i want to control it if the process example: "iexplore" not running in during counting time of that command example: "timeout"
Dave Kreskowiak 6-Apr-19 19:41pm    
OK, so you start the process iexplore.exe then wait for 10 seconds.

Or you can abandon doing this in a batch file and start writing VBScript which will give you a lot more flexibility.
MasterGamerFX 7-Apr-19 12:26pm    
ok but
i can't programming that i want with batch file codes?
there is no option or something else except VBScript?
You "time" your counting.

Store the current time just before you start counting.

After every new count, check the time.

Stop counting when the required time has elapsed.

After the first few counts, "AI" would have you predict how much time should elapse; so you don't have a "runaway" due to a missed count.
 
Share this answer
 
Comments
MasterGamerFX 25-Apr-19 15:52pm    
You can close this topic ,i did it
Thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900