Delta Posted August 15, 2008 Share Posted August 15, 2008 I got really bored and came up with this fun little toy. It's not meant to be used as a real PC locker. Try typing in a wrong password or alt tabbing. You don't need lock.gif to make this work I just had it in there as eye candy. Small note, you may have to hold enter after you type the password. expandcollapse popupOpt("TrayMenuMode",1) #include <WindowsConstants.au3> #include <EditConstants.au3> #include <ScrollBarConstants.au3> #Include <GuiEdit.au3> #include <Misc.au3> Local $Password = "password" $Lock = TrayCreateItem("Lock") $Locked = GUICreate("1337", @DesktopWidth+3, @DesktopHeight, -1, -1, $WS_POPUP, $WS_EX_TOPMOST) GUISetBKColor(0x000000, $Locked) GUICtrlCreatePic("lock.gif", 0, 0,@DesktopWidth,@DesktopHeight) $WrongPw = GUICtrlCreateEdit("", 4, 14, 400, @DesktopHeight - 14, BitOR($ES_AUTOVSCROLL,$ES_READONLY), 0) $InputPw = GUICtrlCreateInput("", @DesktopWidth/2-100, @DesktopHeight/2-10, 200, 20, BitOR($ES_CENTER, $ES_PASSWORD), 0) GUICtrlCreateLabel("::Enter Password::", @DesktopWidth/2-100, @DesktopHeight/2-30, 200, 20, $ES_CENTER, 0) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetFont($WrongPw, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor($WrongPw, 0xFFFFFF) GUICtrlSetBkColor($WrongPw, 0x000000) GUICtrlSetFont($InputPw, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor($InputPw, 0xFFFFFF) GUICtrlSetBkColor($InputPw, 0x000000) While 1 If TrayGetMsg() == $Lock Then WinSetState("[CLASS:Shell_TrayWnd]","", @SW_HIDE) GUISetState(@SW_SHOW, $locked) _MouseTrap(@DesktopWidth,@DesktopHeight) While 1 If _IsPressed("0D") Then If GUICtrlRead($InputPw) == $Password Then GUISetState(@SW_HIDE, $locked) WinSetState("[CLASS:Shell_TrayWnd]","", @SW_SHOW) _MouseTrap() GUICtrlSetData($WrongPw, "") GUICtrlSetData($InputPw, "") ExitLoop Else GUICtrlSetData($WrongPw, _RandomMsg() & @CRLF & GUICtrlRead($WrongPw)) EndIf EndIf If Not WinActive("1337") Then WinActivate("1337") _MouseTrap(@DesktopWidth,@DesktopHeight) GUICtrlCreateLabel("MESS WITH THE BEST DIE LIKE THE REST!", Random(@DesktopWidth-540), Random(@DesktopHeight-30),540,30) GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) GUICtrlSetBkColor(-1, 0x000000) EndIf Sleep(100) Wend EndIf Wend Func _RandomMsg() Local $RandomMsg[10] $RandomMsg[0] = "Wrong Password!" $RandomMsg[1] = "Step away from the computer." $RandomMsg[2] = "Your not Jim." $RandomMsg[3] = "Give Up!" $RandomMsg[4] = "Don't Touch!" $RandomMsg[5] = "Please Enter Correct Password." $RandomMsg[6] = "Try Again!" $RandomMsg[7] = "Stop pushing my buttons." $RandomMsg[8] = "INS! INS!" $RandomMsg[9] = "Ctrl-Alt-Dipshit" Return $RandomMsg[Random(10)] EndFunc [size="1"]Please stop confusing "how to" with "how do"[/size] Link to comment Share on other sites More sharing options...
BrettF Posted August 15, 2008 Share Posted August 15, 2008 Pretty cool Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
pintas Posted August 15, 2008 Share Posted August 15, 2008 Not working full scren for me, don't know why... don't care either It's pretty cool Link to comment Share on other sites More sharing options...
Shino10 Posted August 30, 2008 Share Posted August 30, 2008 very nice i where to stupid to typ in password *password* Link to comment Share on other sites More sharing options...
Sanku1 Posted September 2, 2008 Share Posted September 2, 2008 Global Const $OBJID_CLIENT = 0xFFFFFFFC Global Const ^ ERROR can you tell me why is this? Link to comment Share on other sites More sharing options...
Delta Posted September 2, 2008 Author Share Posted September 2, 2008 Try removing #include <ScrollBarConstants.au3> You don't really need it I just left it in there when I was testing it out. [size="1"]Please stop confusing "how to" with "how do"[/size] Link to comment Share on other sites More sharing options...
Ifraaz Posted October 2, 2008 Share Posted October 2, 2008 Nice! but can you make one without the TrayIcon. it should open the lock with a mouse click straight away. Link to comment Share on other sites More sharing options...
Jango Posted October 2, 2008 Share Posted October 2, 2008 It works fine... Anyone found a way to close it without password ? (i want to know if it's a little bit secure) When i do CTRL-ALT-DEL i can't click any button anyone else have this behavior ? Link to comment Share on other sites More sharing options...
mikidutza Posted October 3, 2008 Share Posted October 3, 2008 your the bet, exactle what i wanted .. Link to comment Share on other sites More sharing options...
Prashant Posted August 14, 2009 Share Posted August 14, 2009 That's Good..Its better then others..OmG..You are really intellegent if u made this Script yourself.. Hehe.. >_< Thanks for you.. 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