Jump to content

Recommended Posts

Posted (edited)

Minimized <> Visible. A window can be visible and minimized or visible and not minimized or hidden and minimized or hidden and not minimized...

; Check if a new notepad window is Visible
Local $state = WinGetState("[CLASS:Notepad]", "")

; Is the "minimized" value set?
If BitAND($state, 2) and not BitAND($state, 16) Then
    MsgBox(0, "Example", "Window is Visible and NOT minimized.")
endif
Edited by KaFu
Posted (edited)

I consider "visible" as something you can see. I wouldn't of expected minimized to also count as visible :). If i need two bitand statements, would the following be better ?

; Check if a new notepad window is Visible
Local $state = WinGetState("[CLASS:Notepad]", "")

; Is the "Visible" value set?
If $state = 7 or $state = 15 Then
MsgBox(0, "Example", "Window is Visible")
EndIf

7 = visible

15 = active

Edited by IanN1990

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
×
×
  • Create New...