Jump to content
Sign in to follow this  
Dieuz

Close specific windows

Recommended Posts

Dieuz

Hi,

I know how to close a window, but let say I want a code that will minimize every window with the word "Apple" on the title. I want it so it minimize all the window until no one is open. How can I do that?

Edited by Dieuz

Share this post


Link to post
Share on other sites
PsaltyDS

Hi,

I know how to close a window, but let say I want a code that will minimize every window with the word "Apple" on the title. I want it so it minimize all the window until no one is open. How can I do that?

Use WinList() in combination with the appropriate Opt("WinTitleMatchMode", $n) to get a list of the target windows, and then loop through the array doing WinSetState(). It's all in the help file.

If you just want EVERYTHING minimized, then use WinMinimizeAll().

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Dieuz

Thanks alot!

Share this post


Link to post
Share on other sites
crashdemons

Are you looking for something like this?

Func WinSetState_All($title_match,$state_flag)
    $wtmm=Opt("WinTitleMatchMode")
    Opt("WinTitleMatchMode",2)
    $wl=WinList($title_match)
    $wx=$wl[0][0]
    For $i=1 To $wx
        WinSetState($wl[$i][1],'',$state_flag)
    Next
    Opt("WinTitleMatchMode",$wtmm)
EndFunc

WinSetState_All('apple',@SW_SHOW)
Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

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  

×