j2112 wrote: ↑22 Jun 2021, 14:54
Hey, this will get the job done for sure. Would this work on more than 2 windows?
My understanding is runwait holds the program, allows run to execute, then releases the runwait command so it does not detect the file explorer window as being open?
I'm an AutoHotkey n00b, so maybe somebody more knowledgeable will weigh in. But it's my understanding that the RunWait essentially just means that AutoHotkey will wait until the first Explorer window is finished opening (not until it's eventually closed) before it moves to the next line. I'm not sure I understood your second paragraph, but the part about not detecting a window as being open sounded off to me.
And I'll let you run the trials, but I'd be surprised if you couldn't open three (or more) Explorer windows the same way. Just use RunWait for each instance other than the last.
As a final note, if you might be interested in opening those windows in particular places on your screen (e.g., side by side), you might want to check out this post:
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=91722
CORRECTION: Having just checked this with Notepad (after reading a little more about it), it is my
revised understanding that running
most programs with RunWait will mean that the next line doesn't execute until the RunWait-ed program closes. But Explorer is an exception to that general rule.