Sign in to follow this  
Followers 0
aj1234

Working With Several Instances Of An Application

3 posts in this topic

Hi,

I'm working with several instances of the same application as the title suggests. I'm getting the application list by looking for the title.

Now, in each application I login to the user account - the login requires a new login window, which makes the main window inactive/out of focus.

Let's say I have 2 applications open, both with the login screen and I have the handles of the main screens of each application.

How do I associate each login screen to its appropriate main screen? I would like to have the handle of each login screen.

Thanks.

Share this post


Link to post
Share on other sites



Global $x = 2 ;Number of Apps to open
Global $PID[$x][2]

For $i = 1 to $x
    $PID[$i][0] = Run("MainApp.exe")
    WinWait("Login Title")
    $PID[$i][1] = WinGetProcess("Login Title")
Next

;~ Returns $PID[1][0] MainApp.exe, $PID[1][1] Login for MainApp.exe 1
;~ Returns $PID[2][0] MainApp.exe, $PID[2][1] Login for MainApp.exe 2

Share this post


Link to post
Share on other sites

Sorry, but I forgot to mention the following:

- All windows and subwindows have the same titles as it's the same application.

- I'm working with non-focused windows for increased processing.

- Login window is created each time it's triggered, so its handle isn't unique.

Thanks.

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  
Followers 0