Hypertrophy Posted July 4, 2009 Share Posted July 4, 2009 (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 July 4, 2009 by Hypertrophy Link to comment Share on other sites More sharing options...
Hypertrophy Posted July 4, 2009 Author Share Posted July 4, 2009 Is there any way to hide the gui instead of minimizing them? Link to comment Share on other sites More sharing options...
darkmaster071 Posted July 4, 2009 Share Posted July 4, 2009 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 Link to comment Share on other sites More sharing options...
Hypertrophy Posted July 5, 2009 Author Share Posted July 5, 2009 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? Link to comment Share on other sites More sharing options...
darkmaster071 Posted July 5, 2009 Share Posted July 5, 2009 I dont think you can hide all windows at once with one function, if that is what you are talking about. Just put more hide functions if you need to hide more 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