Jump to content
Sign in to follow this  

How to winactive from multiple common exe processes

Recommended Posts


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!


Share this post

Link to post
Share on other sites

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 )
    $term[$i] = WinWait($t)
Opt("mousecoordmode", 0)


Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this