Batch file to wait for other program to load/initialize, then execute command?
- by Jason N
I need some assistance writing what should be a fairly basic .BAT file.
I load my main program, but that program takes ~20secs to load and be initialized.
I have another command-line API I can execute to interact with this above program, but obviously until the above program is loaded and initialized there's no point in trying.
If the program isn't running the command-line API returns a string stating exactly this - otherwise it just works and exits. Easy.
So I want to wait until the above is loaded/initialized before firing my API command(s) at it.
I could place a sleep/wait in there, but I want something more solid. The ~20sec wait is not necessarily consistent.
Any way to execute the command-line API over and over until the response is satisfactory, then exit?
J