ali Posted February 15, 2006 Share Posted February 15, 2006 How can I hide windows that are currently open and showing (basically those that show on the taskbar, and not including those in the background run by the system? Of course the other windows will already be hidden, but then I want to also be able to unhide just those. Here is the code that I currently have, but it hides and also unhides every single window, regardless wether it is shown on the taskbar as active/enabled or already hidden. Basically i want to know how to be able the titles of those windows that are open and show on the taskbar. E.g. If i have a folder named Scripts, it will show on the taskbar. I want to be able to simply hide that folder and also unhide it later. If someone can please help me with that, I would much appreciate it and would then be able to figure the rest out. Code to Hide windows Dim $winlistxi Dim $winlistx = WinList() For $winlistxi = 1 to $winlistx[0][0] WinSetState($winlistx[$winlistxi][0], "", @SW_HIDE) Next Code to Unhide windows Dim $winlist = WinList() Dim $winlisti For $winlisti = 1 to $winlisti[0][0] WinSetState($winlist[$winlisti][0], "", @SW_SHOW) Next Link to comment Share on other sites More sharing options...
rambo3889 Posted February 15, 2006 Share Posted February 15, 2006 Just so u know the unhide code will unhide every single My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! Link to comment Share on other sites More sharing options...
ali Posted February 15, 2006 Author Share Posted February 15, 2006 Just so u know the unhide code will unhide every singleTrue, and this is the actual problem I'm having. I need it to only unhide those windows that were originally shown on the taskbar. How can I check if a window is shown on the taskbar or not? Link to comment Share on other sites More sharing options...
cdkid Posted February 15, 2006 Share Posted February 15, 2006 just a thought... i donno if this'll work but you could use WinMinimizeAll() and then use WinGetState to hide all minimized windows? so like i dont know if this'll work WinMinimizeAll() $list = WinList() for $i = 0 to $list[0][0] $state = WinGetState($list[$][0]) if bitand($state, 16) then ;do hiding stuff here and whatnot endif next --again, not sure if it'll work but you can try it ~cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
rambo3889 Posted February 15, 2006 Share Posted February 15, 2006 Okay My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 15, 2006 Moderators Share Posted February 15, 2006 Just deleted old post, this does in fact work on my system. Dim $WinArray = '' HotKeySet('{PGDN}', 'HideTaskBarWindows') HotKeySet('{PGUP}', 'UnHideTaskBarWindows') While 1 Sleep(0x7FFFFFFF) WEnd Func HideTaskBarWindows() $WinArray = '' Local $winlistx = WinList() For $winlistxi = 1 to $winlistx[0][0] If ControlCommand($winlistx[$winlistxi][0], '', '', 'IsVisible', '') And Not StringInStr($winlistx[$winlistxi][0], 'Program Manager') Then $WinArray = $WinArray & $winlistx[$winlistxi][0] & Chr(01) Next $WinArray = StringSplit(StringTrimRight($WinArray, 1), Chr(01)) For $i = 1 To UBound($WinArray) - 1 ControlHide($WinArray[$i], '', '') Next EndFunc Func UnHideTaskBarWindows() For $i = 1 To UBound($WinArray) - 1 ControlShow($WinArray[$i], '', '') Next EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
scriptler Posted April 14, 2013 Share Posted April 14, 2013 Hey Guys, i know the Thread is old but maybe you can help me. Can i modify the last script to hide one window permanently without a Hotkey? Thanks for Help. Link to comment Share on other sites More sharing options...
Decipher Posted April 14, 2013 Share Posted April 14, 2013 Scriptler, Welcome to the AutoIt Forums. If your just trying to hide one window then you need not concern your self with the above script. It is quite simple just get a handle to the window using WinGetHandle() and then use WinSetState() to hide the window. $hWin = WinGetHandle("The window's title", "") WinSetState($hWin, "", @SW_HIDE) Also I think its better to start new topics rather then to revisit old ones just be sure to take your time when searching before posting. Spoiler Link to comment Share on other sites More sharing options...
scriptler Posted April 15, 2013 Share Posted April 15, 2013 Thanks for Your Answer Decipher, but i wll not hide the Windows. I will hide the Title in the Taskbar and Show the Windows. Link to comment Share on other sites More sharing options...
Decipher Posted May 5, 2013 Share Posted May 5, 2013 scriptler,If you need help using the code example from the above link than please create a new topic. Anonymous Spoiler 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