MrCheese Posted July 6, 2017 Share Posted July 6, 2017 Hi All! My problem: I have multiple processes of the same process name from different file paths that I want to loop through with WinActivate. What would be the best way to either run through the processes with that process name, record their PID to an array, and then WinActivate with each process ID recorded? Or can you obtain the process ID when you know the file path of a process? Open to ideas and suggestions! Thanks Link to comment Share on other sites More sharing options...
mikell Posted July 6, 2017 Share Posted July 6, 2017 Did you try ProcessList ? Link to comment Share on other sites More sharing options...
jdelaney Posted July 7, 2017 Share Posted July 7, 2017 With: _WinAPI_GetProcessFileName IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
MrCheese Posted July 7, 2017 Author Share Posted July 7, 2017 I did, but I have 8 instances of the same file name. MAYBE I could rename each instance to a different name, and then track that. eg program1.exe, program2.exe etc For the moment, I used mouse click to activate each program from the task bar and record its window handle Func SelectWin() Opt("mousecoordmode", 1) dim $term[$noTerminal] For $i = 0 to ubound($term)-1 MouseClick("left", $firsttermX+ (($i) * $gapX),$firsttermY ) sleep(1000) $term[$i] = WinWait($t) WinMove($t,"",1,1,1285,1000) ;msgbox(0,"",$term[$i]) Next Opt("mousecoordmode", 0) EndFunc 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