#include #include #include #include #include #Region ### START Koda GUI section ### Form=H:\AutoIt\GUI's for Programs\Hide Window 3.kxf $Form1_1 = GUICreate("Hide Window", 393, 133, -1, -1) $Button1 = GUICtrlCreateButton("Set Password", 8, 8, 75, 25) $Group1 = GUICtrlCreateGroup("Password", 8, 40, 377, 65) $Input1 = GUICtrlCreateInput("", 16, 57, 361, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) $Checkbox1 = GUICtrlCreateCheckbox("Show Hidden Text", 16, 80, 115, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button2 = GUICtrlCreateButton("Hide", 88, 8, 75, 25) $Button3 = GUICtrlCreateButton("Unhide", 168, 8, 75, 25) $Label1 = GUICtrlCreateLabel("Status :", 8, 107, 40, 17) $Label2 = GUICtrlCreateLabel("", 48, 107, 340, 17) $Button4 = GUICtrlCreateButton("Set Window", 309, 8, 75, 25) $Input2 = GUICtrlCreateInput("", 16, 57, 361, 21) GUICtrlSetState(-1, 32) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUICtrlSetState($Input1, 256) Local $window, $handle, $pass Local $lock = 0 Local $hidden = 0 While 1 $nMsg = GUIGetMsg() if $lock < 1 Then Sleep(30) if GUICtrlRead($checkbox1) = 1 Then if GUICtrlRead($Input1) <> GUICtrlRead($Input2) Then GUICtrlSetData($Input2, GUICtrlRead($input1)) EndIf GUICtrlSetState($Input1, 32); Hide GUICtrlSetState($Input2, 16); Show Else GUICtrlSetState($Input2, 32); Hide GUICtrlSetState($Input1, 16); Show EndIf EndIf 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, "") GUICtrlSetState($checkbox1, 128); Disable GUICtrlSetState($Input2, 32); Hide GUICtrlSetState($Input1, 16); Show $lock = 1 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) GUICtrlSetState($checkbox1, 128) GUICtrlSetData($label2, "Window Hidden") $lock = 1 $hidden = 1 EndFunc Func Unhide() if $lock > 0 Then if $pass = GUICtrlRead($input1) Then WinSetState($handle, "", @SW_SHOW) GUICtrlSetData($label2, "Window Shown") GUICtrlSetData($input1, "") GUICtrlSetState($button1, 64) GUICtrlSetState($checkbox1, 64) $lock = 0 $hidden = 0 Else GUICtrlSetData($label2, "Password Incorrect") GUICtrlSetData($input1, "") EndIf EndIf EndFunc