Jump to content
Sign in to follow this  
Mast3rpyr0

Hide non autoit windows with guisetstate()?

Recommended Posts

Mast3rpyr0

Is it possible to do this, maybe sonmething like GuiSetState(@SW_HIDE, WinGetTitle("title"))?

I wanna install folding @ homeat my school and dont want it to be visible.

Share this post


Link to post
Share on other sites
alien13

Is it possible to do this, maybe sonmething like GuiSetState(@SW_HIDE, WinGetTitle("title"))?

I wanna install folding @ homeat my school and dont want it to be visible.

I'm not sure if this is what you want but:

WinSetState("Untitled -", "", @SW_HIDE)

That will hide notepad. You could adjust that to your needs and use @SW_SHOW to reshow if needed.

alien13


Share this post


Link to post
Share on other sites
Nahuel

You wanna hide all non-AutoIt windows? Then you can use something like this:

#include <Misc.au3>
$WinsList=WinList()
For $i=1 To $WinsList[0][0]
    If $WinsList[$i][0] <> "" AND $WinsList[$i][0] <> "Program Manager" AND _ 
    IsVisible($WinsList[$i][1]) AND IsNotAutoIt($WinsList[$i][1])  Then
        MsgBox(0,"","Window to hide= "&$WinsList[$i][0] )
;~      WinSetState($WinsList[$i][0],"",@SW_HIDE)
    EndIf
Next

Func IsVisible($handle)
  If BitAnd( WinGetState($handle), 2 ) Then 
    Return 1
  Else
    Return 0
  EndIf
EndFunc

Func IsNotAutoit($handle)
    If _IsClassName($handle,"AutoIt v3 GUI") Then
        Return 0
    Else
        Return 1
    EndIf
EndFunc

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.