Scagnetti Posted June 28, 2013 Share Posted June 28, 2013 I've been working on a script that runs several batch files with the following criteria (if possible) 1) be able to view each individual CMD window as the batch file runs 2) be able to move the CMD window to a set location 3) run one batch file at a time I started with the following: Run($batch, "", @SW_HIDE) Sleep(1000) WinMove("[CLASS:ConsoleWindowClass]", "", $cmdx, $cmdy) WinSetState("[CLASS:ConsoleWindowClass]", "", @SW_SHOW) ProcessWaitClose("cmd.exe") This works, but I've come across an issue where if there is secondary cmd.exe process running, it'll stop because of the ProcessWaitClose("cmd.exe") I don't necessarily want to run taskkill to close any already-open cmd processes because this may cause some issues with those already running scripts. The obvious solution here is to use RunWait, but I can't seem to find a way to use WinMove with RunWait - is this possible, or is there an alternate solution? Link to comment Share on other sites More sharing options...
JohnOne Posted June 28, 2013 Share Posted June 28, 2013 $pid = Run($batch, "", @SW_HIDE) Sleep(1000) WinMove("[CLASS:ConsoleWindowClass]", "", $cmdx, $cmdy) WinSetState("[CLASS:ConsoleWindowClass]", "", @SW_SHOW) ProcessWaitClose($pid) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now