Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Create a loop in batch file, that exits with any key press?  (Read 48019 times)

0 Members and 1 Guest are viewing this topic.

ham fam

    Topic Starter


    Starter

    • Experience: Familiar
    • OS: Windows 10
    Create a loop in batch file, that exits with any key press?
    « on: August 18, 2022, 08:36:23 AM »
    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?