lordlol Posted November 5, 2007 Share Posted November 5, 2007 Hello guys.Im in search of a script(a Autoit3 GUI) which should have a input line(like inputbox).It should be possible to check if the insered word is correct.I actually want to protect a script with a password.I always did it this way:But now I want a thing like this,but the only reason to make a gui for this is, that i wanna have a pic included(in the GUI), so i cant use inputbox-way anymore.I hope u can help me :/Thank you in advance,lordlol Link to comment Share on other sites More sharing options...
Xenobiologist Posted November 5, 2007 Share Posted November 5, 2007 Hi,see other post. Use GUI with GUICtrlCreateInputSo long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
lordlol Posted November 5, 2007 Author Share Posted November 5, 2007 well, i allready used the Search-function and i read some threads. but i still got no clue about it. what i want is, a GuiCTRLCreateInput-field and a button(ok- button) so i the user of this tool starts it, a gui will appear, he enters the password in the guictrlcreateinput-field and press the ok-button(on the guy). and by pressing ok, the gui has to check the guictrlcreateinput-field. if the password matches the password i wrote in the tool,he should be allowed to access the entired script,if not , the script should close directly. Link to comment Share on other sites More sharing options...
ofLight Posted November 5, 2007 Share Posted November 5, 2007 #include <GUIConstants.au3> $GUI = GUICreate("", 300, 100, -1, -1, $WS_POPUP) GUISetBkColor (5726593) GUICtrlCreateLabel ("Blah, Blah, Blah, Password crap, Blah", 50, 20) $Input_password = GUICtrlCreateInput("",100,40,60,22,$ES_PASSWORD) $Button_1 = GUICtrlCreateButton ("ok", 80, 70, 90) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $Button_1 Then _Checkpass(GUICtrlRead($Input_password)) Sleep(20) Wend Func _Checkpass($passwd) if $passwd = "qwerty" Then MsgBox (0,"","Correct Pass") Else MsgBox (0,"","WRONG password") Exit EndIf EndFunc There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly Link to comment Share on other sites More sharing options...
lordlol Posted November 5, 2007 Author Share Posted November 5, 2007 #include <GUIConstants.au3> $GUI = GUICreate("", 300, 100, -1, -1, $WS_POPUP) GUISetBkColor (5726593) GUICtrlCreateLabel ("Blah, Blah, Blah, Password crap, Blah", 50, 20) $Input_password = GUICtrlCreateInput("",100,40,60,22,$ES_PASSWORD) $Button_1 = GUICtrlCreateButton ("ok", 80, 70, 90) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $Button_1 Then _Checkpass(GUICtrlRead($Input_password)) Sleep(20) Wend Func _Checkpass($passwd) if $passwd = "qwerty" Then MsgBox (0,"","Correct Pass") Else MsgBox (0,"","WRONG password") Exit EndIf EndFunc very nice =), thank you ♥ well..since i'm a retard i've got 1 last question: if i use this script, where am i going to place my main script? i inserted it after "MsgBox (0,"","Correct Pass")" , but the script didnt work.. ♥ Link to comment Share on other sites More sharing options...
ofLight Posted November 5, 2007 Share Posted November 5, 2007 that was just to show howto use the Button and input, this should be closer to what u want. #include <GUIConstants.au3> $GUI = GUICreate("", 300, 100, -1, -1, $WS_POPUP) GUISetBkColor (5726593) GUICtrlCreateLabel ("Blah, Blah, Blah, Password crap, Blah", 50, 20) $Input_password = GUICtrlCreateInput("",100,40,60,22,$ES_PASSWORD) $Button_1 = GUICtrlCreateButton ("ok", 80, 70, 90) GUISetState(@SW_SHOW) $Check = 0 While 1 $msg = GUIGetMsg() If $msg = $Button_1 Then $Check = _Checkpass(GUICtrlRead($Input_password)) If $Check = 1 Then ExitLoop Sleep(20) Wend ;Rest of the script goes here Func _Checkpass($passwd) if $passwd = "qwerty" Then MsgBox (0,"","Correct Pass") Return 1 Else MsgBox (0,"","WRONG password") Return 0 EndIf EndFunc There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly Link to comment Share on other sites More sharing options...
lordlol Posted November 5, 2007 Author Share Posted November 5, 2007 (edited) that was just to show howto use the Button and input, this should be closer to what u want. #include <GUIConstants.au3> $GUI = GUICreate("", 300, 100, -1, -1, $WS_POPUP) GUISetBkColor (5726593) GUICtrlCreateLabel ("Blah, Blah, Blah, Password crap, Blah", 50, 20) $Input_password = GUICtrlCreateInput("",100,40,60,22,$ES_PASSWORD) $Button_1 = GUICtrlCreateButton ("ok", 80, 70, 90) GUISetState(@SW_SHOW) $Check = 0 While 1 $msg = GUIGetMsg() If $msg = $Button_1 Then $Check = _Checkpass(GUICtrlRead($Input_password)) If $Check = 1 Then ExitLoop Sleep(20) Wend ;Rest of the script goes here Func _Checkpass($passwd) if $passwd = "qwerty" Then MsgBox (0,"","Correct Pass") Return 1 Else MsgBox (0,"","WRONG password") Return 0 EndIf EndFunc oh, very good =) this is nearly perfect for me :/ the last(really the last now ) is, well, if i enter the password and press ok, the script starts etc and its nice. but is there a way to close this guy after entering password/changing the inferface of the guy totally? thanks i thought of replacing "GUISetBkColor (5726593)" with "$Pic_1 = GuiCtrlCreatePic("pic.jpg", 0, 0, 500, 500)" AFTER the password was entered right. Edited November 5, 2007 by lordlol Link to comment Share on other sites More sharing options...
ofLight Posted November 5, 2007 Share Posted November 5, 2007 Ya, you can edit the GUI however fits your needs best, you can remove the Input and Button, add a Background pic , or even change the size and style. but for me with small scripts atleast, its easyest just to create another. Im not sure exactly what you want? but all of the methods for completely removing a window are in the help file. "WinClose" "WinKill" or you can just add this line to just above where u add your script in GUISetState(@SW_HIDE,$GUI) There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly Link to comment Share on other sites More sharing options...
lordlol Posted November 5, 2007 Author Share Posted November 5, 2007 OK, thank you m8 this guy is good enough for me now. thanks ♥ 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