Phases Posted April 21, 2006 Share Posted April 21, 2006 I'm probably not using the correct verbage here. I'm playing with the Window Controls. WinActive, WinWaitActive etc... And I am trying to determine if there is a way to know when a particular window has changed state. For example. My Microsoft Office Communicator. When I get a new message - it flashes in the taskbar - but does not become active. Is there some way I can know that it's now flashing and expecting a response from me? Thanks in advance. Link to comment Share on other sites More sharing options...
elgabionline Posted April 21, 2006 Share Posted April 21, 2006 I'm probably not using the correct verbage here. I'm playing with the Window Controls. WinActive, WinWaitActive etc... And I am trying to determine if there is a way to know when a particular window has changed state. For example. My Microsoft Office Communicator. When I get a new message - it flashes in the taskbar - but does not become active. Is there some way I can know that it's now flashing and expecting a response from me? Maybe WinGetState can help you: WinGetState ( "title" [, "text"] ) Success: Returns a value indicating the state of the window. Multiple values are added together so use BitAND() to examine the part you are interested in: 1 = Window exists 2 = Window is visible 4 = Windows is enabled 8 = Window is active 16 = Window is minimized 32 = Windows is maximized My Microsoft Office Communicator. When I get a new message - it flashes in the taskbar if window is initially active, you can try with: ; ********************************************* ; Get Active Window (Title)(Text) ; Author - SmOke_N & Valuater ; ********************************************* Func WinGetActive () Local $HidOpt = Opt("WinDetectHiddenText", 1);0=don't detect, 1=do detect Local $w_WinList = WinList() For $i = 1 to $w_WinList[0][0] If $w_WinList[$i][0] <> "" AND BitAnd(WinGetState($w_WinList[$i][1]), 2) _ And BitAnd(WinGetState($w_WinList[$i][1]), 8) Then Return $w_WinList[$i][0] Next Opt("WinDetectHiddenText", $HidOpt);0=don't detect, 1=do detect EndFunc You try with the Window Info Tool too. Is a Helpful to get values of windows. 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