General Programs Useful Programs and Applications non WoW-related.
Window Hider with GUI and custom HotKeys
Corporal
Rep Power: 2
Reputation: 25 Posts: 30
Join Date: Aug 2007
Window Hider with GUI and custom HotKeys -
11-06-2007
First of all, the main idea for this came from randombob's program:
[Only registered and activated users can see links. ]
however, the code is mostly mine.
It's all done in AutoIt. Basically this program will hide any window you want it to when you press a hotkey, and show the window when you press the hotkey again. This version has a GUI which has its own HotKey to hide/show it. The GUI can be used to change the window that is hidden (up to 5) and the hotkey for each of them. You can also change the HotKey to show/hide the GUI.
The default HotKeys are F1-F5. By default there are no windows set, but you can change this by changing the lines
Code:
$1 = ""
$2 = ""
$3 = ""
$4 = ""
$5 = ""
to whatever windows you would like.
Windows are hidden by partial matching, so if the title is "Untitled - Notepad" entering "- Notepad" in the GUI would hide that window.
Another example, to hide firefox you could used "- Mozilla Firefox"
When setting hotkeys, your can use ! for ALT, ^ for CTRL, + for SHIFT and # for the windows key. Also, to use F1 - F9 you need to put {F#} for example: the hotkey for F1 would be {F1}.
Notes: Be careful not to start the program again if it is already running, that will cause the second copy to steal the first copy's hotkeys, giving you no way to close the first.
The default hotkey for the GUI window is F8. The GUI is hidden by default at startup. ESC closes the program, and F9 will show a tooltip showing what windows are in which slots.
The source:
Code:
#NoTrayIcon
#include <GUIConstants.au3>
$1 = ""
$2 = ""
$3 = ""
$4 = ""
$5 = ""
$Old1 = "{F1}"
$Old2 = "{F2}"
$Old3 = "{F3}"
$Old4 = "{F4}"
$Old5 = "{F5}"
$OldConfig = "{F8}"
$1Hidden = False
$2Hidden = False
$3Hidden = False
$4Hidden = False
$5Hidden = False
$ConfigHidden = True
HotKeySet($Old1,"hide1")
HotKeySet($Old2,"hide2")
HotKeySet($Old3,"hide3")
HotKeySet($Old4,"hide4")
HotKeySet($Old5,"hide5")
HotKeySet($OldConfig,"ShowConfig")
HotKeySet("{F9}","tooltipon")
HotKeySet("{esc}","exit1")
Opt("WinTitleMatchMode", 2)
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ###
$Form1_1 = GUICreate("Hider", 561, 436, 209, 138)
$Label1 = GUICtrlCreateLabel("1:", 24, 48, 13, 17)
$Label2 = GUICtrlCreateLabel("2:", 24, 84, 13, 17)
$Label3 = GUICtrlCreateLabel("3:", 24, 114, 13, 17)
$Label4 = GUICtrlCreateLabel("4:", 24, 148, 13, 17)
$Label5 = GUICtrlCreateLabel("5:", 24, 180, 13, 17)
$Label6 = GUICtrlCreateLabel("Programs:", 24, 16, 51, 17)
$txtProg1 = GUICtrlCreateInput("", 56, 48, 185, 21)
$txtProg2 = GUICtrlCreateInput("", 56, 80, 185, 21)
$txtProg3 = GUICtrlCreateInput("", 56, 112, 185, 21)
$txtProg4 = GUICtrlCreateInput("", 56, 144, 185, 21)
$txtProg5 = GUICtrlCreateInput("", 56, 176, 185, 21)
$cmdSetNames = GUICtrlCreateButton("Set", 288, 104, 105, 33, 0)
$Label7 = GUICtrlCreateLabel("HotKeys:", 24, 208, 47, 17)
$Label8 = GUICtrlCreateLabel("1:", 24, 239, 13, 17)
$Label9 = GUICtrlCreateLabel("2:", 24, 275, 13, 17)
$Label10 = GUICtrlCreateLabel("3:", 24, 305, 13, 17)
$Label11 = GUICtrlCreateLabel("4:", 24, 339, 13, 17)
$Label12 = GUICtrlCreateLabel("5:", 24, 371, 13, 17)
$txtHotKey1 = GUICtrlCreateInput("", 48, 240, 73, 21)
$txtHotKey2 = GUICtrlCreateInput("", 48, 272, 73, 21)
$txtHotKey3 = GUICtrlCreateInput("", 48, 304, 73, 21)
$txtHotKey4 = GUICtrlCreateInput("", 48, 336, 73, 21)
$txtHotKey5 = GUICtrlCreateInput("", 48, 368, 73, 21)
$Label13 = GUICtrlCreateLabel("Special Keys:", 128, 216, 68, 17)
$Label14 = GUICtrlCreateLabel("ALT = !", 144, 248, 42, 17)
$Label15 = GUICtrlCreateLabel("CTRL = ^", 144, 280, 53, 17)
$Label16 = GUICtrlCreateLabel("SHIFT = +", 144, 312, 56, 17)
$Label17 = GUICtrlCreateLabel("WINDOWS KEY = #", 144, 336, 109, 17)
$Label18 = GUICtrlCreateLabel("Config window HotKey (this window): ", 136, 392, 181, 17)
$txtConfigHotKey = GUICtrlCreateInput("", 328, 392, 105, 21)
$cmdSetHotKeys = GUICtrlCreateButton("Set", 232, 256, 81, 41, 0)
$cmdSetConfigHotKey = GUICtrlCreateButton("Set", 448, 392, 97, 17, 0)
GUISetState(@SW_HIDE)
#EndRegion ### END Koda GUI section ###
GUICtrlSetOnEvent($cmdSetNames, "SetNames")
GUICtrlSetOnEvent($cmdSetHotKeys, "SetHotKeys")
GUICtrlSetOnEvent($cmdSetConfigHotKey, "SetConfigHotkey")
if $1 = "" Then
$1 = "@@@@@@@@@@@@@@@@@@@@"
EndIf
if $2 = "" Then
$2 = "@@@@@@@@@@@@@@@@@@@@"
EndIf
if $3 = "" Then
$3 = "@@@@@@@@@@@@@@@@@@@@"
EndIf
if $4 = "" Then
$4 = "@@@@@@@@@@@@@@@@@@@@"
EndIf
if $5 = "" Then
$5 = "@@@@@@@@@@@@@@@@@@@@"
EndIf
idle()
Func SetNames()
$1 = GUICtrlRead($txtProg1)
$2 = GUICtrlRead($txtProg2)
$3 = GUICtrlRead($txtProg3)
$4 = GUICtrlRead($txtProg4)
$5 = GUICtrlRead($txtProg5)
EndFunc
Func SetHotKeys()
HotKeySet($Old1)
HotKeySet($Old2)
HotKeySet($Old3)
HotKeySet($Old4)
HotKeySet($Old5)
HotKeySet($OldConfig)
HotKeySet(GUICtrlRead($txtHotKey1),"hide1")
HotKeySet(GUICtrlRead($txtHotKey2),"hide2")
HotKeySet(GUICtrlRead($txtHotKey3),"hide3")
HotKeySet(GUICtrlRead($txtHotKey4),"hide4")
HotKeySet(GUICtrlRead($txtHotKey5),"hide5")
$Old1 = GUICtrlRead($txtHotKey1)
$Old2 = GUICtrlRead($txtHotKey2)
$Old3 = GUICtrlRead($txtHotKey3)
$Old4 = GUICtrlRead($txtHotKey4)
$Old5 = GUICtrlRead($txtHotKey5)
$OldConfig = GUICtrlRead($txtConfigHotKey)
EndFunc
Func SetConfigHotkey()
HotKeySet($OldConfig)
HotKeySet(GUICtrlRead($txtConfigHotKey),"ShowConfig")
$OldConfig = GUICtrlRead($txtConfigHotKey)
EndFunc
Func ShowConfig()
If $ConfigHidden = True Then
GUISetState(@SW_SHOW)
$ConfigHidden = False
Else
GUISetState(@SW_HIDE)
$ConfigHidden = True
EndIf
EndFunc
Func GUICLOSE()
exit1()
EndFunc
func hide1()
If ($1Hidden = True) Then
WinSetState($1,"",@SW_HIDE)
$1Hidden = False
Else
WinSetState($1,"",@SW_SHOW)
$1Hidden = True
EndIf
idle()
EndFunc
func hide2()
If ($2Hidden = True) Then
WinSetState($1,"",@SW_HIDE)
$2Hidden = False
Else
WinSetState($1,"",@SW_SHOW)
$2Hidden = True
EndIf
idle()
EndFunc
func hide3()
If ($3Hidden = True) Then
WinSetState($1,"",@SW_HIDE)
$3Hidden = False
Else
WinSetState($1,"",@SW_SHOW)
$3Hidden = True
EndIf
idle()
EndFunc
func hide4()
If ($4Hidden = True) Then
WinSetState($1,"",@SW_HIDE)
$4Hidden = False
Else
WinSetState($1,"",@SW_SHOW)
$4Hidden = True
EndIf
idle()
EndFunc
func hide5()
If ($5Hidden = True) Then
WinSetState($1,"",@SW_HIDE)
$5Hidden = False
Else
WinSetState($1,"",@SW_SHOW)
$5Hidden = True
EndIf
idle()
EndFunc
func tooltipon()
HotKeySet("{F9}","tooltipoff")
ToolTip("F1: "&$1&@CR&"F2: "&$2&@CR&"F3: "&$3&@CR&"F4: "&$4&@CR&"F5: "&$5,10,10)
sleep(3000)
ToolTip("")
EndFunc
func tooltipoff()
HotKeySet("{F9}","tooltipon")
ToolTip("")
EndFunc
func idle()
;ToolTip("F1: "&$1&@CR&"F2: "&$2&@CR&"F3: "&$3&@CR&"F4: "&$4&@CR&"F5: "&$5,10,10)
sleep(3000)
ToolTip("")
while 1
sleep(1)
WEnd
EndFunc
func exit1()
ToolTip("Closing...",10,10)
GUISetState(@SW_HIDE)
WinSetState($1,"",@SW_SHOW)
WinSetState($2,"",@SW_SHOW)
WinSetState($3,"",@SW_SHOW)
WinSetState($4,"",@SW_SHOW)
WinSetState($5,"",@SW_SHOW)
Sleep(500)
Exit
EndFunc
And for anyone that would like the compiled exe, I'm having trouble uploading it...so if anyone could compile it and post it it would be much appreciated =]
Donate to remove ads. Re: Window Hider with GUI and custom HotKeys
Master Sergeant
Rep Power: 2
Reputation: 13 Posts: 102
Join Date: Jan 2007
Re: Window Hider with GUI and custom HotKeys -
11-06-2007
Re: Window Hider with GUI and custom HotKeys
Knight-Lieutenant
Rep Power: 3
Reputation: 48 Posts: 263
Join Date: Nov 2006
Location: NJ
Re: Window Hider with GUI and custom HotKeys -
11-06-2007
www. leetbrowser .com
The in-game web browser! No more alt-tabbing out of full screen games!
Re: Window Hider with GUI and custom HotKeys
Site Donator
Rep Power: 3
Reputation: 45 Posts: 214
Join Date: Jun 2006
Location: In The Upcoming Patc
Re: Window Hider with GUI and custom HotKeys -
11-07-2007
What program did you try to compile in with ?
And is it just the souce code you want exe'd ?
Souce code you've put up's been compiled and uploaded
[Only registered and activated users can see links. ]
Virus results
AhnLab-V32007.11.7.12007.11.07-
AntiVir7.6.0.342007.11.07-
Authentium4.93.82007.11.05-
Avast4.7.1074.02007.11.06-
AVG7.5.0.5032007.11.07-
BitDefender7.22007.11.07-
CAT-QuickHeal9.002007.11.07TrojanDownloader.AutoIt.ae
ClamAV0.91.22007.11.07-
DrWeb4.44.0.091702007.11.07-
eSafe7.0.15.02007.11.06suspicious Trojan/Worme
Trust-
Vet31.2.52762007.11.07-
Ewido4.02007.11.07-
FileAdvisor12007.11.07-
Fortinet3.11.0.02007.10.19W32/Sohanad.DW!worm
Prot4.4.2.542007.11.07-
Secure6.70.13030.02007.11.07-I
karusT3.1.1.122007.11.07Worm.Win32.AutoIt.
dKaspersky7.0.0.1252007.11.07-
McAfee51572007.11.06-
Microsoft1.30072007.11.07-
NOD32v226422007.11.06-
Norman5.80.022007.11.06-
Panda9.0.0.42007.11.06-
Prevx1V22007.11.07-
Rising20.17.22.002007.11.07-
Sophos4.23.02007.11.07-
Sunbelt2.2.907.02007.11.06-
Symantec102007.11.07-
TheHacker6.2.9.1182007.11.06-
VBA323.12.2.42007.11.06Worm.Win32.AutoIt.d
Webwasher-
Gateway6.0.12007.11.07Worm.Win32.ModifiedUPX.gen!90 (suspicious)
Here's the file details so you can check size before download to make sure i haven't swapped files ect..
File size: 252001 bytesMD5: edee3369333c5a1294b016ef204cc439SHA1: 6331bb57e134f5722c4494d854c5db5e70190d21packers: UPXpackers: PE_Patch.UPX
I've added nothing, but being Au3 its commonly mistaken as worms due to the way its coded.
Now doing Youtube view increasing, PM me with amount of views you want you'll offer in return
(No stupid amounts, you must have 50rep+. Video must be of good quality. I hold the right to refuse my service)
Last edited by кιѕѕу; 11-07-2007 at 08:40 AM ..
Re: Window Hider with GUI and custom HotKeys
Corporal
Rep Power: 2
Reputation: 25 Posts: 30
Join Date: Aug 2007
Re: Window Hider with GUI and custom HotKeys -
11-07-2007
Quote:
Originally Posted by
issacobra
Actually, I'd never looked at your code before doing this. I apologize if its similar, but I certainly did not steal your code.
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by
vBSEO 3.2.0
vBulletin Skin developed by:
vBStyles.com