Jump to content

Recommended Posts

Posted (edited)

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
Posted

Use this to get the window state and modify it. Look into helpfiles for more help.

$hIE = _IEPropertyGet($var, "hwnd") ; Get the handle

WinSetState($hIE, "", @SW_HIDE) ; Hide it

Posted

cool. thanks. and they way they are hiding themselves is like one by one. it'll hide one then the next and so on. is there something i can do maybe with my for loop that'll hide them all at once?

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