Jump to content

Working With Several Instances Of An Application


aj1234
 Share

Recommended Posts

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.

Link to comment
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

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...