Shade Posted May 28, 2006 Share Posted May 28, 2006 Hey, I'm pretty new to AutoIt. I wrote this script that hides a window and then shows it again. Check it out, tell me what you think. WinHider.au3 [u]Window Hider[/u] Link to comment Share on other sites More sharing options...
Rick Posted May 28, 2006 Share Posted May 28, 2006 Hey, I'm pretty new to AutoIt. I wrote this script that hides a window and then shows it again. Check it out, tell me what you think. Welcome to AutiIt Shade, well done on your first script.You'll find many useful (and not so useful) things that AutoIt can do If you're never sure about something just ask in the appropriate forum as generally someone somewhere is always watchingrick Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
jacksont123 Posted May 28, 2006 Share Posted May 28, 2006 Excellent work for your first script ... and post ! Link to comment Share on other sites More sharing options...
slightly_abnormal Posted May 29, 2006 Share Posted May 29, 2006 nice.. Link to comment Share on other sites More sharing options...
JoshDB Posted May 29, 2006 Share Posted May 29, 2006 Mom looking over your shoulder... ? Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite Link to comment Share on other sites More sharing options...
Shade Posted May 29, 2006 Author Share Posted May 29, 2006 (edited) @JoshDB Lol. Yeah kinda. I made it so I could hide any window of something I wasn't supposed to be doing at the time - like playing games, browsing the forums, etc. Edited May 29, 2006 by Shade [u]Window Hider[/u] Link to comment Share on other sites More sharing options...
Skrip Posted May 29, 2006 Share Posted May 29, 2006 Very Good job! Can't get this to work! Trying to make it so you can hide 2 windows. expandcollapse popupHotKeySet ("^+z", "Hide") HotKeySet ("^+x", "Show") HotKeySet ("+z", "Hide2") HotKeySet ("+x", "Show2") Opt("TrayIconHide", 1) $hidden = "no" $hidden2 = "no" While 1 If $hidden = "yes" Then Sleep (10) Else Global $title = WinGetTitle("") Sleep (10) EndIf If $hidden2 = "yes" Then Sleep(10) Else Global $title2 = WinGetTitle("") Sleep(10) EndIf WEnd Func Hide() $hidden = "yes" If WinExists("" & $title) Then WinSetState ("" & $title, "", @SW_HIDE) EndIf EndFunc Func Show() $hidden = "no" If WinExists("" & $title) Then WinSetState ("" & $title, "", @SW_SHOW) EndIf EndFunc Func Hide2() $hidden2 = "yes" If WinExists("" & $title2) Then WinSetState ("" & $title2, "", @SW_HIDE) EndIf EndFunc Func Show2() $hidden2 = "no" If WinExists("" & $title2) Then WinSetState ("" & $title2, "", @SW_SHOW) EndIf EndFunc [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
JoshDB Posted May 29, 2006 Share Posted May 29, 2006 I don't see anything wrong with your code... Strange. Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite Link to comment Share on other sites More sharing options...
rambo3889 Posted May 29, 2006 Share Posted May 29, 2006 (edited) i think Ur titles in wrong place Edited May 29, 2006 by rambo3889 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! youÂ’re the best in town Fight! Link to comment Share on other sites More sharing options...
rambo3889 Posted May 29, 2006 Share Posted May 29, 2006 Think this work expandcollapse popupHotKeySet ("^+z", "Hide") HotKeySet ("^+x", "Show") HotKeySet ("+z", "Hide2") HotKeySet ("+x", "Show2") Opt("TrayIconHide", 1) $hidden = "no" $hidden2 = "no" While 1 If $hidden = "yes" Then Sleep (10) Else Global $title = WinGetTitle("") Sleep (10) EndIf If $hidden2 = "yes" Then Sleep(10) Else Global $title2 = WinGetTitle("") Sleep(10) EndIf WEnd Func Hide() $hidden = "yes" If WinExists($title) Then WinSetState ($title, "", @SW_HIDE) EndIf EndFunc Func Show() $hidden = "no" If WinExists( $title) Then WinSetState ($title , "", @SW_SHOW) EndIf EndFunc Func Hide2() $hidden2 = "yes" If WinExists($title2 ) Then WinSetState ($title2, "", @SW_HIDE) EndIf EndFunc Func Show2() $hidden2 = "no" If WinExists($title2) Then WinSetState $title2 ,"", @SW_SHOW) EndIf EndFunc 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! youÂ’re the best in town Fight! Link to comment Share on other sites More sharing options...
marfdaman Posted May 29, 2006 Share Posted May 29, 2006 (edited) Well actually that doesn't work, but this does (came from you rambo, just some mistakes fixed): expandcollapse popupHotKeySet ("^z", "Hide") HotKeySet ("^!z", "Show") HotKeySet ("^x", "Hide2") HotKeySet ("^!x", "Show2") Opt("TrayIconHide", 1) $hidden = "no" $hidden2 = "no" While 1 If $hidden = "yes" Then Sleep (10) Else Global $title = WinGetTitle("") Sleep (10) EndIf If $hidden2 = "yes" Then Sleep(10) Else Global $title2 = WinGetTitle("") Sleep(10) EndIf WEnd Func Hide() $hidden = "yes" If WinExists($title) Then WinSetState ($title, "", @SW_HIDE) EndIf EndFunc Func Show() $hidden = "no" If WinExists( $title) Then WinSetState ($title , "", @SW_SHOW) EndIf EndFunc Func Hide2() $hidden2 = "yes" If WinExists($title2 ) Then WinSetState ($title2, "", @SW_HIDE) EndIf EndFunc Func Show2() $hidden2 = "no" If WinExists($title2) Then WinSetState ($title2 ,"", @SW_SHOW) EndIf EndFunc Regards Edited May 30, 2006 by marfdaman Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link to comment Share on other sites More sharing options...
Shade Posted May 29, 2006 Author Share Posted May 29, 2006 (edited) Wow! Thanks guys. I was trying to get it to hide two windows, but I was really tired at the time and just stuck with the one window. I'm definetly going to use this one now. Great job! Edited May 29, 2006 by Shade [u]Window Hider[/u] Link to comment Share on other sites More sharing options...
Skrip Posted May 29, 2006 Share Posted May 29, 2006 It still only hides 1 window for me. Please fix. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 29, 2006 Moderators Share Posted May 29, 2006 It still only hides 1 window for me. Please fix.LOL, as long as you've been here, you would think you would try to contribute a fix yourself if it didn't work right. 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...
Shade Posted May 29, 2006 Author Share Posted May 29, 2006 Firestorm - I am using the one that marfdaman used: expandcollapse popupHotKeySet ("^+z", "Hide") HotKeySet ("^+x", "Show") HotKeySet ("^!z", "Hide2") HotKeySet ("^!x", "Show2") Opt("TrayIconHide", 1) $hidden = "no" $hidden2 = "no" While 1 If $hidden = "yes" Then Sleep (10) Else Global $title = WinGetTitle("") Sleep (10) EndIf If $hidden2 = "yes" Then Sleep(10) Else Global $title2 = WinGetTitle("") Sleep(10) EndIf WEnd Func Hide() $hidden = "yes" If WinExists($title) Then WinSetState ($title, "", @SW_HIDE) EndIf EndFunc Func Show() $hidden = "no" If WinExists( $title) Then WinSetState ($title , "", @SW_SHOW) EndIf If WinExists($title2) Then WinSetState($title2, "", @SW_SHOW) EndIf EndFunc Func Hide2() $hidden2 = "yes" If WinExists($title2 ) Then WinSetState ($title2, "", @SW_HIDE) EndIf EndFunc Func Show2() $hidden2 = "no" If WinExists($title2) Then WinSetState ($title2 ,"", @SW_SHOW) EndIf EndFunc I edited the hotkeys, Hide 1 is CTRL-SHIFT-Z, Show 1 is CTRL-SHIFT-X, Hide 2 is CTRL-ALT-Z, Show 2 is CTRL-ALT-X. This should work out for you. [u]Window Hider[/u] Link to comment Share on other sites More sharing options...
Outshynd Posted May 29, 2006 Share Posted May 29, 2006 MsgBox(48, "Window 1", "After clicking OK, please bring the first window you want to hide to the front of your screen within 2 seconds.") Sleep(2000) Dim $hWnd1 = WinGetTitle("") MsgBox(48, "Window 2", "After clicking OK, please bring the second window you want to hide to the front of your screen within 2 seconds.") Sleep(2000) Dim $hWnd2 = WinGetTitle("") ;... Func Show2() $hidden2 = "no" If WinExists($hWnd2) Then WinSetState ($hWnd2,"", @SW_SHOW) EndIf EndFunc ;et cetera Link to comment Share on other sites More sharing options...
Skrip Posted May 29, 2006 Share Posted May 29, 2006 Firestorm - I am using the one that marfdaman used:THanks works great! [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
taurus905 Posted May 30, 2006 Share Posted May 30, 2006 Cool script! Did anyone notice that it can hide all the icons on your desktop? taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs Link to comment Share on other sites More sharing options...
Shade Posted May 30, 2006 Author Share Posted May 30, 2006 Cool script! Did anyone notice that it can hide all the icons on your desktop? taurus905Yeah. I've done that before on accident. It can also hide the start button and the bar. [u]Window Hider[/u] Link to comment Share on other sites More sharing options...
Skrip Posted May 30, 2006 Share Posted May 30, 2006 And the bottem bar and icons i saw that too, it's awesome! [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] 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