Create a loop in batch file, that exits with any key press?

Started by ham fam, August 18, 2022, 08:36:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ham fam

I'm tinkering with a batch file, I use when i start my computer.  One of the steps, is to open certain servers.  This can take a while, when its done, i want to click a button to move to the next step.  Which it does currently.  But it seems to change the focus to these other server locations, rather than back to the batch file.  Only problem is i have to use the mouse to click in the batch file, to then click any key to move forward.

I tried creating a loop to keep pinging the batch file window, but I don't know how to exit the loop if any button is pressed. 

Any thoughts?