How to insert a timeout or wait command in batch script?

Started by incrediblehark, December 11, 2023, 09:16:51 AM

Previous topic - Next topic

incrediblehark

Does anyone know of a way to insert a time delay or a wait command into a batch script in human68k? Or an app that would do this? Pause works but I want it to not require a keyboard input to continue. I know newer versions of DOS can do this pretty easily but I don't know of any way to do this in Human OS. Any help or advice is appreciated!

rezb1t

Quote from: incrediblehark on December 11, 2023, 09:16:51 AMDoes anyone know of a way to insert a time delay or a wait command into a batch script in human68k? Or an app that would do this? Pause works but I want it to not require a keyboard input to continue. I know newer versions of DOS can do this pretty easily but I don't know of any way to do this in Human OS. Any help or advice is appreciated!
I wrote a C program to do just that, it takes the number of seconds to wait as an argument.

So for example:

SLEEP 5
will wait for 5 seconds. It does not accept decimals, only whole integers. Hope this helps!

incrediblehark

#2
Thank you so much! Going to try this out as soon as I can. Want to use it to display a message or picture in my game scripts on the hdd image. I'll let you know how it goes. Thanks again!

EDIT: Works perfect! This is going to help me out a lot in future batch script editing.

rezb1t

Glad to hear it! I made some small changes to the program and reuploaded it to my post above. It works exactly the same when used with a correct argument, but now if you give it no argument or too many arguments it will print some text telling how to use the program.