Jump to content

[FIXED] get state of gui/control


Recommended Posts

Is this the right way to check to see if a GUI is minimize or not? Because even when the GUI's are minimized the msgbox() saying so never pops up. only the msgbox(0,"","icons are restored") appears no matter what.

For $i = 1 To $ahInput[0][0]

If WinGetState($ahInput[$i][0]) = @SW_MINIMIZE Then; if already minimized then restore

msgbox(0,"","minimized")

GUISetState(@SW_RESTORE, ($ahInput[$i][0]))

Else; if they are restored then minimize them

msgbox(0,"","restored")

GUISetState(@SW_MINIMIZE, ($ahInput[$i][0]))

EndIf

Next

[code]For $i = 1 To $ahInput[0][0]
        $icostate = WinGetState($ahInput[$i][0])
        If BitAnd($icostate, 16) Then
            WinSetState($ahInput[$i][0], "", @SW_RESTORE)
        ElseIf BitAnd($icostate, 2) Then 
            WinSetState($ahInput[$i][0], "", @SW_MINIMIZE)
        EndIf
    Next
Edited by Hypertrophy
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...