Jump to content

WinWaitActive


DCCD
 Share

Recommended Posts

Hi,

Wait for 2 windows to exist and be active $1 and $2, I try ($1,$2) bad Idea :P

How to Make It Work?

$1=("Untitled - ")
$2=("My Music")
If WinWaitActive($1,$2) Then
    MsgBox (0000000660000000087000000   , "Win Active - Nothing", "Nothing")
EndIf
Link to comment
Share on other sites

Maybe:

$1=("Untitled - ")
$2=("My Music")

Do
    $State1=WinGetState($1)
    $State2=WinGetState($2)
    Sleep(100)
Until BitAND($State1,1,8) And BitAND($State2,1,8);1 = Window exists, 8 = Window is active 

MsgBox (0000000660000000087000000   , "Win Active - Nothing", "Nothing")

but I think only one window can be active (titlebar is colored) at a time...

then try this: (all two = exists, only one = active)

Until (BitAND($State1,1) And BitAND($State2,1)) And (BitAND($State1,8) Or BitAND($State2,8))

E

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...