#include #include #include #include #include #Region ### START Koda GUI section ### Form=C:\Users\Hunter\Desktop\Hide.kxf $Form1 = GUICreate("Hide Window", 395, 122, -1, -1) $Button1 = GUICtrlCreateButton("Set Password", 8, 8, 75, 25, $WS_GROUP) $Group1 = GUICtrlCreateGroup("Password", 8, 40, 377, 49) $Input1 = GUICtrlCreateInput("", 16, 57, 361, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button2 = GUICtrlCreateButton("Hide", 88, 8, 75, 25, $WS_GROUP) $Button3 = GUICtrlCreateButton("Unhide", 168, 8, 75, 25, $WS_GROUP) $Label1 = GUICtrlCreateLabel("Status :", 8, 99, 40, 17) $Label2 = GUICtrlCreateLabel("", 48, 99, 340, 17) $Button4 = GUICtrlCreateButton("Set Window", 312, 8, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUICtrlSetState($Input1, 256) Global $window Global $handle Global $pass While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 SetPassword() Case $Button4 SetWindow() Case $Button2 Hide() Case $Button3 Unhide() EndSwitch WEnd Func SetPassword() $pass = GUICtrlRead($input1) GUICtrlSetData($label2, "Password Set") GUICtrlSetData($input1, "") EndFunc Func SetWindow() MsgBox(0, "Message", "Select The Window Within 3 Seconds Of Pressing OK.") Sleep(3000) $window = WinGetTitle("[ACTIVE]") $handle = WinGetHandle($window) GUICtrlSetData($label2, "Window Set") EndFunc Func Hide() WinSetState($handle, "", @SW_HIDE) GUICtrlSetState($button1, 128) GUICtrlSetData($label2, "Window Hidden") EndFunc Func Unhide() if $pass = GUICtrlRead($input1) Then WinSetState($handle, "", @SW_SHOW) GUICtrlSetState($button1, 64) GUICtrlSetData($label2, "Window Shown") GUICtrlSetData($input1, "") Else GUICtrlSetData($label2, "Password Incorrect") GUICtrlSetData($input1, "") EndIf EndFunc