Nbanonimous Posted February 26, 2008 Share Posted February 26, 2008 Hey guys, I made a lockout program cuz i was bored it requires a password... expandcollapse popup#include <GUIConstants.au3> #include <String.au3> Opt("WinTitleMatchMode", 4) Opt("MouseCoordMode", 1) Opt("CaretCoordMode", 1) Opt("WinWaitDelay", 0) Global Const $Password = InputBox("Enter Password", "Enter Password Here.", "", "*") If @error Then Exit Global Const $InputTime = 1000 ;<---------- EDIT THIS: This sets the time that you have to type the password Global $Status = False Global $oldmPos[4] Global $cTHandle = TimerInit() Global $oiText Global Const $Width = 150 GLobal Const $Height = 100 Global Const $gHandle = GUICreate("Computer Locked!", $Width, $Height, -1, -1, $WS_CAPTION, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW) Global Const $lHandle = GUICtrlCreateLabel("Input Password", 5, ($Height/2)-20, $Width-15) Global Const $iHandle = GUICtrlCreateInput("", 5, $Height/2, $Width-15, -1, $ES_PASSWORD) GUISetState() While 1 $mPos = MouseGetPos() $iText = GuiCtrlRead($iHandle) If $mPos[0] <> $oldmPos[0] Or $mPos[1] <> $oldmPos[1] Then WinMove($gHandle, "", $mPos[0]-($Width/2), $mPos[1]-($Height/2)) EndIf If Not WinActive($gHandle) Then WinActivate($gHandle) EndIf ;~ If TimerDiff($cTHandle) > 1000 Then GUICtrlSetData($lHandle, "Enter Password") If $iText == $oiText And $iText <> "" Then GUICtrlSetData($lHandle, "Denied h4x0r!") GUICtrlSetData($iHandle, "") SoundPlay(@ScriptDir & "\Deny.wav", 0) ElseIf $iText <> $oiText And $iText == $Password Then GUICtrlSetData($lHandle, "Access Granted!") WinSetTitle($gHandle, "", "Computer Unlocked!") Sleep(50) GUIDelete($gHandle) SoundPlay(@ScriptDir & "\Allow.wav", 1) ;~ SoundPlay(@ScriptDir & "\taunt1.wav", 1) ;~ SoundPlay(@ScriptDir & "\taunt2.wav", 1) Exit EndIf $oiText = $iText $cTHandle = TimerInit() EndIf $oldmPos = $mPos Sleep(1) If WinExists('Windows Task Manager') Then WinClose('Windows Task Manager') EndIf MouseMove(512,430) WEnd I wanna add a HotKeySet for ALT + V and it terminates i wasnt able to do it cuz when i did Func Terminate() it said error help! Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com Link to comment Share on other sites More sharing options...
ReaImDown Posted February 26, 2008 Share Posted February 26, 2008 (edited) Hey guys, I made a lockout program cuz i was bored it requires a password... expandcollapse popup#include <GUIConstants.au3> #include <String.au3> Opt("WinTitleMatchMode", 4) Opt("MouseCoordMode", 1) Opt("CaretCoordMode", 1) Opt("WinWaitDelay", 0) Global Const $Password = InputBox("Enter Password", "Enter Password Here.", "", "*") If @error Then Exit Global Const $InputTime = 1000;<---------- EDIT THIS: This sets the time that you have to type the password Global $Status = False Global $oldmPos[4] Global $cTHandle = TimerInit() Global $oiText Global Const $Width = 150 GLobal Const $Height = 100 Global Const $gHandle = GUICreate("Computer Locked!", $Width, $Height, -1, -1, $WS_CAPTION, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW) Global Const $lHandle = GUICtrlCreateLabel("Input Password", 5, ($Height/2)-20, $Width-15) Global Const $iHandle = GUICtrlCreateInput("", 5, $Height/2, $Width-15, -1, $ES_PASSWORD) GUISetState() While 1 $mPos = MouseGetPos() $iText = GuiCtrlRead($iHandle) If $mPos[0] <> $oldmPos[0] Or $mPos[1] <> $oldmPos[1] Then WinMove($gHandle, "", $mPos[0]-($Width/2), $mPos[1]-($Height/2)) EndIf If Not WinActive($gHandle) Then WinActivate($gHandle) EndIf ;~ If TimerDiff($cTHandle) > 1000 Then GUICtrlSetData($lHandle, "Enter Password") If $iText == $oiText And $iText <> "" Then GUICtrlSetData($lHandle, "Denied h4x0r!") GUICtrlSetData($iHandle, "") SoundPlay(@ScriptDir & "\Deny.wav", 0) ElseIf $iText <> $oiText And $iText == $Password Then GUICtrlSetData($lHandle, "Access Granted!") WinSetTitle($gHandle, "", "Computer Unlocked!") Sleep(50) GUIDelete($gHandle) SoundPlay(@ScriptDir & "\Allow.wav", 1) ;~ SoundPlay(@ScriptDir & "\taunt1.wav", 1) ;~ SoundPlay(@ScriptDir & "\taunt2.wav", 1) Exit EndIf $oiText = $iText $cTHandle = TimerInit() EndIf $oldmPos = $mPos Sleep(1) If WinExists('Windows Task Manager') Then WinClose('Windows Task Manager') EndIf MouseMove(512,430) WEnd I wanna add a HotKeySet for ALT + V and it terminates i wasnt able to do it cuz when i did Func Terminate() it said error help! try func _Quit() and do this for disabling the task manager RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ System","DisableTaskMgr","REG_DWORD",1) Edited February 26, 2008 by ReaImDown [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
RobertKipling Posted February 26, 2008 Share Posted February 26, 2008 Syntax might be bad, but... HotKeySet("!v", "exitprog") ... func exitprog() exit endfunc Link to comment Share on other sites More sharing options...
Nbanonimous Posted February 26, 2008 Author Share Posted February 26, 2008 (edited) wow that was fast ty is there a reason why i had an error>? Edited February 26, 2008 by Nblufire12 Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com Link to comment Share on other sites More sharing options...
Nbanonimous Posted February 26, 2008 Author Share Posted February 26, 2008 #include <GUIConstants.au3> #include <String.au3> Opt("WinTitleMatchMode", 4) Opt("MouseCoordMode", 1) Opt("CaretCoordMode", 1) Opt("WinWaitDelay", 0) Global Const $Password = InputBox("Enter Password", "Enter Password Here.", "", "*") If @error Then Exit Global Const $InputTime = 1000 ;<---------- EDIT THIS: This sets the time that you have to type the password Global $Status = False Global $oldmPos[4] Global $cTHandle = TimerInit() Global $oiText Global Const $Width = 150 GLobal Const $Height = 100 Global Const $gHandle = GUICreate("Computer Locked!", $Width, $Height, -1, -1, $WS_CAPTION, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW) Global Const $lHandle = GUICtrlCreateLabel("Input Password", 5, ($Height/2)-20, $Width-15) Global Const $iHandle = GUICtrlCreateInput("", 5, $Height/2, $Width-15, -1, $ES_PASSWORD) GUISetState() While 1 $mPos = MouseGetPos() $iText = GuiCtrlRead($iHandle) If $mPos[0] <> $oldmPos[0] Or $mPos[1] <> $oldmPos[1] Then WinMove($gHandle, "", $mPos[0]-($Width/2), $mPos[1]-($Height/2)) EndIf If Not WinActive($gHandle) Then WinActivate($gHandle) EndIf ;~ If TimerDiff($cTHandle) > 1000 Then GUICtrlSetData($lHandle, "Enter Password") If $iText == $oiText And $iText <> "" Then GUICtrlSetData($lHandle, "Denied h4x0r!") GUICtrlSetData($iHandle, "") SoundPlay(@ScriptDir & "\Deny.wav", 0) ElseIf $iText <> $oiText And $iText == $Password Then GUICtrlSetData($lHandle, "Access Granted!") WinSetTitle($gHandle, "", "Computer Unlocked!") Sleep(50) GUIDelete($gHandle) SoundPlay(@ScriptDir & "\Allow.wav", 1) ;~ SoundPlay(@ScriptDir & "\taunt1.wav", 1) ;~ SoundPlay(@ScriptDir & "\taunt2.wav", 1) Exit EndIf $oiText = $iText $cTHandle = TimerInit() EndIf $oldmPos = $mPos Sleep(1) If WinExists('Windows Task Manager') Then WinClose('Windows Task Manager') EndIf MouseMove(512,430) WEnd HotKeySet("{ALT} + {V} ", "Terminate") Func Terminate() Exit 0 EndFunc ;==>Terminate this didnt work once it was in the program i couldnt do anything... Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com Link to comment Share on other sites More sharing options...
Nbanonimous Posted February 26, 2008 Author Share Posted February 26, 2008 no help on why my hotkey wont execute Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com Link to comment Share on other sites More sharing options...
qazwsx Posted February 26, 2008 Share Posted February 26, 2008 your hotkeyset is never executed. It is after the while loop so the command is never done. Put the Hotkeyset at the top of the program and you should be fine. Link to comment Share on other sites More sharing options...
Nbanonimous Posted February 27, 2008 Author Share Posted February 27, 2008 iight ty Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com Link to comment Share on other sites More sharing options...
Nbanonimous Posted February 27, 2008 Author Share Posted February 27, 2008 #include <GUIConstants.au3> #include <String.au3> Opt("WinTitleMatchMode", 4) Opt("MouseCoordMode", 1) Opt("CaretCoordMode", 1) Opt("WinWaitDelay", 0) Global Const $Password = InputBox("Enter Password", "Enter Password Here.", "", "*") If @error Then Exit Global Const $InputTime = 1000 ;<---------- EDIT THIS: This sets the time that you have to type the password Global $Status = False Global $oldmPos[4] Global $cTHandle = TimerInit() Global $oiText Global Const $Width = 150 GLobal Const $Height = 100 Global Const $gHandle = GUICreate("Computer Locked!", $Width, $Height, -1, -1, $WS_CAPTION, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW) Global Const $lHandle = GUICtrlCreateLabel("Input Password", 5, ($Height/2)-20, $Width-15) Global Const $iHandle = GUICtrlCreateInput("", 5, $Height/2, $Width-15, -1, $ES_PASSWORD) GUISetState() HotKeySet("{ALT} + {V} ", "Terminate") Func Terminate() Exit 0 EndFunc ;==>Terminate While 1 $mPos = MouseGetPos() $iText = GuiCtrlRead($iHandle) If $mPos[0] <> $oldmPos[0] Or $mPos[1] <> $oldmPos[1] Then WinMove($gHandle, "", $mPos[0]-($Width/2), $mPos[1]-($Height/2)) EndIf If Not WinActive($gHandle) Then WinActivate($gHandle) EndIf ;~ If TimerDiff($cTHandle) > 1000 Then GUICtrlSetData($lHandle, "Enter Password") If $iText == $oiText And $iText <> "" Then GUICtrlSetData($lHandle, "Denied h4x0r!") GUICtrlSetData($iHandle, "") SoundPlay(@ScriptDir & "\Deny.wav", 0) ElseIf $iText <> $oiText And $iText == $Password Then GUICtrlSetData($lHandle, "Access Granted!") WinSetTitle($gHandle, "", "Computer Unlocked!") Sleep(50) GUIDelete($gHandle) SoundPlay(@ScriptDir & "\Allow.wav", 1) ;~ SoundPlay(@ScriptDir & "\taunt1.wav", 1) ;~ SoundPlay(@ScriptDir & "\taunt2.wav", 1) Exit EndIf $oiText = $iText $cTHandle = TimerInit() EndIf $oldmPos = $mPos Sleep(1) If WinExists('Windows Task Manager') Then WinClose('Windows Task Manager') EndIf MouseMove(512,430) WEnd i raised it up a bit but it still wont work... are u sure im doin something wrong? when i lock my computer i press Alt V nothing happens but when i type my password, it works. i need an alternative! Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com Link to comment Share on other sites More sharing options...
Nbanonimous Posted February 27, 2008 Author Share Posted February 27, 2008 it doesnt work!? plz help Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com Link to comment Share on other sites More sharing options...
SpookMeister Posted February 27, 2008 Share Posted February 27, 2008 I think your syntax is wrong here: HotKeySet("{ALT} + {V} ", "Terminate") Look at the help file for HotKeySet() I believe ALT + V should be !v [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Nbanonimous Posted February 27, 2008 Author Share Posted February 27, 2008 ill look in it ty no need to move it like move it higher up in the code? Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com Link to comment Share on other sites More sharing options...
SpookMeister Posted February 27, 2008 Share Posted February 27, 2008 It should work there, If you want the hotkey to work while the program is in your while loop, then you need to have the hotkeyset command somewhere before the loop starts. Which you have done. The actual terminate function can be anywhere in the script, but the standard convention is to put all functions at the end of the script [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Nbanonimous Posted February 27, 2008 Author Share Posted February 27, 2008 o shit thanks alot! Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com Link to comment Share on other sites More sharing options...
Aassdd Posted February 27, 2008 Share Posted February 27, 2008 Can you post the code if it's working? I tried to make a similar one but was bored and stopped. Link to comment Share on other sites More sharing options...
Mojo Posted February 27, 2008 Share Posted February 27, 2008 Can you post the code if it's working? I tried to make a similar one but was bored and stopped.Just copy the code from Post #9 and replace the line...HotKeySet("{ALT} + {V} ", "Terminate")with ...HotKeySet("!v", "Terminate")... that's all. It works (somehow), although the timer somehow didn't work when I tested it, so the password prompt (to unlock) showed up immediately after I entered a password.AND, if you can just press ALT+v - where is the security?I would also recommend to change the Task Manager closing thing to the process name instead of a title. I have a german win xp and the title there is Windows Task-Manager.Looking for taskmgr.exe would probably be better since that is the same on every Windows in every language version, except maybe chinese or so ;-) You can fool some of the people all of the time, and all of the people some of the time, but you can not fool all of the people all of the time. Abraham Lincoln - http://www.ae911truth.org/ - http://www.freedocumentaries.org/ Link to comment Share on other sites More sharing options...
Nbanonimous Posted February 27, 2008 Author Share Posted February 27, 2008 (edited) sure least I can do this forum pretty much helped me all the way lol #include <GUIConstants.au3> #include <String.au3> Opt("WinTitleMatchMode", 4) Opt("MouseCoordMode", 1) Opt("CaretCoordMode", 1) Opt("WinWaitDelay", 0) Global Const $Password = InputBox("Enter Password", "Enter Password Here.", "", "*") If @error Then Exit Global Const $InputTime = 1000 ;<---------- EDIT THIS: This sets the time that you have to type the password Global $Status = False Global $oldmPos[4] Global $cTHandle = TimerInit() Global $oiText Global Const $Width = 150 GLobal Const $Height = 100 Global Const $gHandle = GUICreate("Computer Locked!", $Width, $Height, -1, -1, $WS_CAPTION, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW) Global Const $lHandle = GUICtrlCreateLabel("Input Password", 5, ($Height/2)-20, $Width-15) Global Const $iHandle = GUICtrlCreateInput("", 5, $Height/2, $Width-15, -1, $ES_PASSWORD) GUISetState() HotKeySet("!v", "Terminate") Func Terminate() Exit 0 EndFunc ;==>Terminate While 1 $mPos = MouseGetPos() $iText = GuiCtrlRead($iHandle) If $mPos[0] <> $oldmPos[0] Or $mPos[1] <> $oldmPos[1] Then WinMove($gHandle, "", $mPos[0]-($Width/2), $mPos[1]-($Height/2)) EndIf If Not WinActive($gHandle) Then WinActivate($gHandle) EndIf ;~ If TimerDiff($cTHandle) > 1000 Then GUICtrlSetData($lHandle, "Enter Password") If $iText == $oiText And $iText <> "" Then GUICtrlSetData($lHandle, "Denied h4x0r!") GUICtrlSetData($iHandle, "") SoundPlay(@ScriptDir & "\Deny.wav", 0) ElseIf $iText <> $oiText And $iText == $Password Then GUICtrlSetData($lHandle, "Access Granted!") WinSetTitle($gHandle, "", "Computer Unlocked!") Sleep(50) GUIDelete($gHandle) SoundPlay(@ScriptDir & "\Allow.wav", 1) ;~ SoundPlay(@ScriptDir & "\taunt1.wav", 1) ;~ SoundPlay(@ScriptDir & "\taunt2.wav", 1) Exit EndIf $oiText = $iText $cTHandle = TimerInit() EndIf $oldmPos = $mPos Sleep(1) If WinExists('Windows Task Manager') Then WinClose('Windows Task Manager') EndIf If ProcessExists( "taskmgr.exe") Then ProcessClose( "taskmgr.exe") EndIf MouseMove(512,430) WEnd Edited February 27, 2008 by Nblufire12 Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com Link to comment Share on other sites More sharing options...
Nbanonimous Posted February 27, 2008 Author Share Posted February 27, 2008 Just copy the code from Post #9 and replace the line...HotKeySet("{ALT} + {V} ", "Terminate")with ...HotKeySet("!v", "Terminate")... that's all. It works (somehow), although the timer somehow didn't work when I tested it, so the password prompt (to unlock) showed up immediately after I entered a password.AND, if you can just press ALT+v - where is the security?I would also recommend to change the Task Manager closing thing to the process name instead of a title. I have a german win xp and the title there is Windows Task-Manager.Looking for taskmgr.exe would probably be better since that is the same on every Windows in every language version, except maybe chinese or so ;-)Jus added itfor the securityill run this program..walk away from the computerand no one can get into my computerthey can shutoffbut can't access my filesonly you and me knows its Alt + V no one elseadded process ty Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com Link to comment Share on other sites More sharing options...
Mojo Posted February 28, 2008 Share Posted February 28, 2008 (edited) Jus added itfor the securityill run this program..walk away from the computerand no one can get into my computerthey can shutoffbut can't access my filesonly you and me knows its Alt + V no one elseadded process tyNice! :-)One other thing I noticed...Global Const $InputTime = 1000 ;<---------- EDIT THIS: This sets the time that you have to type the password...you say there "EDIT THIS", but you never use that variable later in the script?! So changing it there has no effect at all. F.e. if I want it to lock after 30secI guess you wanted it to be like that:instead of If TimerDiff($cTHandle) > 1000 Then it should be If TimerDiff($cTHandle) > $InputTime ThenAnd did you know, there is a built-in function to capture the mouse and later release again - check the include files. I think it's in Misc.au3. Edited February 28, 2008 by Mojo You can fool some of the people all of the time, and all of the people some of the time, but you can not fool all of the people all of the time. Abraham Lincoln - http://www.ae911truth.org/ - http://www.freedocumentaries.org/ Link to comment Share on other sites More sharing options...
Nbanonimous Posted February 28, 2008 Author Share Posted February 28, 2008 im pretty new with autoit whats the Misc.au3 do? Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com 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