mircea Posted April 24, 2007 Share Posted April 24, 2007 well i want to make a complex script ( complex because i dont know all the commands and how to use them) well i want to make a script that is asking for a password and if i type the password corect i must go in some program that i can add text or things like those can some one help me with something ?? i make this but it dosent work :-| at the IF-ELSE well and how do i give a value to the $password2 = ??? so please help me with some idea and source code i really want to make it Thank you very much $password1 = InputBox("Enter the Password", "Enter the password for your Documents and things - Moisoiu Mircea Mihai.", "", "*") $password2 = 4 if $password1 = $password2 MsgBox(0,"Password Corect", "Welcome Moisoiu Mircea Mihai") then Link to comment Share on other sites More sharing options...
Gabburd Posted April 24, 2007 Share Posted April 24, 2007 Your problem is just a matter of arranging the If statement Try this: $password1 = InputBox("Enter the Password", "Enter the password for your Documents and things - Moisoiu Mircea Mihai.", "", "*") $password2 = 4 if $password1 = $password2 Then MsgBox(0,"Password Corect", "Welcome Moisoiu Mircea Mihai") EndIf Link to comment Share on other sites More sharing options...
daslick Posted April 24, 2007 Share Posted April 24, 2007 (edited) if you are wanting to have an entire program run if the password is correct, you may want to make it... $passinput = InputBox("Enter the Password", "Enter the password for your Documents and things - Moisoiu Mircea Mihai.", "", "*") $password = 4 If $passinput <> $password then Exit MsgBox(0,"Password Corect", "Welcome Moisoiu Mircea Mihai") Edited April 24, 2007 by daslick Link to comment Share on other sites More sharing options...
mircea Posted April 24, 2007 Author Share Posted April 24, 2007 dang how to you is working ?? how did you figure it out O_O my god :-| Thank you very much by the way i may need a little more help from you with some answers at this question 1)how is it working with IF and ELSE not only Then 2)and how do i make it if i type a wrong password and not 4 to not ENTER ??? is something like this $password1 = InputBox("Enter the Password", "Enter the password for your Documents and things - Moisoiu Mircea Mihai.", "", "*") $password2 = 4 if $password1 = $password2 then MsgBox(0,"Password Corect", "Welcome Moisoiu Mircea Mihai") EndIf Else or how ? Link to comment Share on other sites More sharing options...
daslick Posted April 24, 2007 Share Posted April 24, 2007 See my last post... it does what you are asking in much simpler code Link to comment Share on other sites More sharing options...
mircea Posted April 24, 2007 Author Share Posted April 24, 2007 what is the <> meaning ?? sorry for the stupid question Link to comment Share on other sites More sharing options...
daslick Posted April 24, 2007 Share Posted April 24, 2007 (edited) <> means not equal ... thats actually a good question.. I'm glad you want to know what it means instead of blindly using the code. Anything else? Edited April 24, 2007 by daslick Link to comment Share on other sites More sharing options...
mircea Posted April 24, 2007 Author Share Posted April 24, 2007 Thank you very very much and now for my last and very important question how can i make the script if i type some Text for an example the script to dont forget it and save it in the .exe file from were i start the program ??? is there some command or something and can you give me some example to know how to make it on the future ? ( sorry guys i am a begginer and i ma trying to learning from my little mistakes ) Link to comment Share on other sites More sharing options...
daslick Posted April 24, 2007 Share Posted April 24, 2007 could you please explain? how can i make the script if i type some Text for an example the script to dont forget it and save it in the .exe file from were i start the program ??? Link to comment Share on other sites More sharing options...
mircea Posted April 24, 2007 Author Share Posted April 24, 2007 well i want to make a Password Bank script so what i was saying is => i type a text for example MONEY when i type MONEY i want the Password Bank.exe file to remeber it in the .exe not in a .txt file so can you help me with this Link to comment Share on other sites More sharing options...
Developers Jos Posted April 24, 2007 Developers Share Posted April 24, 2007 well i want to make a Password Bank script so what i was saying is => i type a text for example MONEY when i type MONEY i want the Password Bank.exe file to remeber it in the .exe not in a .txt fileso can you help me with thisWon't work that way, but what about you start doing some basic reading and looking at the helpfile examples first so you better understand what you need to ask help on. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mircea Posted April 24, 2007 Author Share Posted April 24, 2007 ok thank you Link to comment Share on other sites More sharing options...
evilertoaster Posted April 24, 2007 Share Posted April 24, 2007 some folks dabbled with this some moons ago-http://www.autoitscript.com/forum/index.php?showtopic=26360 Link to comment Share on other sites More sharing options...
daslick Posted April 25, 2007 Share Posted April 25, 2007 That looks a little complicated... I will definitely look into it (eventually) Link to comment Share on other sites More sharing options...
mircea Posted April 25, 2007 Author Share Posted April 25, 2007 (edited) Well i make this is good but my only problem is at =>> do If $passinput <> $password then msgbox(0,"Wrong Password", "The Password you type is wrong") <<== is continuing repeting it selfs, how do i make it to enter again the password or something like that And By the way how do i encrypt a .txt file ( i really want to make some Password DB ) Begginer but with full ideas #include <File.au3> #include <GUIConstants.au3> $passinput = InputBox("Introdu Parola Moisoiu Mircea Mihai", "Introduce-ti parola de acces la baza de date - Moisoiu Mircea Mihai.", "", "*") $password = FileReadLine("D:\test.txt",1) do If $passinput <> $password then msgbox(0,"Wrong Password", "The Password you type is wrong") Until $passinput = $password MsgBox(0,"Password Corect", "Welcome Moisoiu Mircea Mihai") Edited April 25, 2007 by mircea Link to comment Share on other sites More sharing options...
Gabburd Posted April 25, 2007 Share Posted April 25, 2007 Your line that gets the $passinput should be inside the Do loop, just before you check to see if it is correctLike this:#include <File.au3> #include <GUIConstants.au3> $password = FileReadLine("D:\test.txt",1) Do $passinput = InputBox("Introdu Parola Moisoiu Mircea Mihai", "Introduce-ti parola de acces la baza de date - Moisoiu Mircea Mihai.", "", "*") If $passinput <> $password then msgbox(0,"Wrong Password", "The Password you type is wrong") Until $passinput = $password MsgBox(0,"Password Corect", "Welcome Moisoiu Mircea Mihai")As for file encrypting you might want to check out http://www.autoitscript.com/forum/index.ph...&hl=encryptOne other thing you might want to do is to check to see if File opened properly, and if it didn't then exit the script.Otherwise just deleting the file will make a password not neccesary. Link to comment Share on other sites More sharing options...
mircea Posted April 25, 2007 Author Share Posted April 25, 2007 (edited) thank you right now i was thinking at what you write ) lol by the way i check the little things with the Encrypt and i am looking at something that i never see in my life i dont know how to use that ( sorry i am a begginer in programing) Edited April 25, 2007 by mircea Link to comment Share on other sites More sharing options...
Gabburd Posted April 25, 2007 Share Posted April 25, 2007 Maybe the _StringEncrypt function would be more what you want. Try the following, the first code will set your password in the textfile, the second one is your script. #include <String.au3> $passwordfile = "D:\test.txt" $password = InputBox( "Set your password", "Type in the password to set", "","*") $encrypted_password = _StringEncrypt ( 1, $password, $password ) $FileHandle = FileOpen( $passwordfile, 2 ) FileWrite( $passwordfile, $encrypted_password ) FileClose( $FileHandle )oÝ÷ Ù«¢+Ø¥¹±Õ±Ðí¥±¹ÔÌÐì(¥¹±Õ±ÐíU% ½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±ÐíMÑÉ¥¹¹ÔÌÐì((ÀÌØí¹ÉåÁÑ}ÁÍÍݽÉô¥±I1¥¹ ÅÕ½ÐíèÀäÈíÑÍйÑáÐÅÕ½Ðì°Ä¤)¼(ÀÌØíÁÍÍ¥¹ÁÕÐô%¹ÁÕÑ ½à ÅÕ½Ðí%¹ÑɽÔAɽ±5½¥Í½¥Ô5¥É5¥¡¤ÅÕ½Ðì°ÅÕ½Ðí%¹ÑɽյѤÁɽ±Ì±éÑ´5½¥Í½¥Ô5¥É5¥¡¤¸ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðì¨ÅÕ½Ðì¤($ÀÌØí¹ÉåÁÑ}ÁÍÍ¥¹ÁÕÐô}MÑÉ¥¹¹ÉåÁÐ Ä°ÀÌØíÁÍÍ¥¹ÁÕаÀÌØíÁÍÍ¥¹ÁÕФ(%ÀÌØí¹ÉåÁÑ}ÁÍÍ¥¹ÁÕбÐìÐìÀÌØí¹ÉåÁÑ}ÁÍÍݽÉÑ¡¸µÍ½à À°ÅÕ½Ðí]ɽ¹AÍÍݽÉÅÕ½Ðì°ÅÕ½ÐíQ¡AÍÍݽÉå½ÔÑåÁ¥ÌÝɽ¹ÅÕ½Ðì¤)U¹Ñ¥°ÀÌØí¹ÉåÁÑ}ÁÍÍ¥¹ÁÕÐôÀÌØí¹ÉåÁÑ}ÁÍÍݽÉ)5Í ½à À°ÅÕ½ÐíAÍÍÝ½É ½ÉÐÅÕ½Ðì°ÅÕ½Ðí]±½µ5½¥Í½¥Ô5¥É5¥¡¤ÅÕ½Ðì Link to comment Share on other sites More sharing options...
mircea Posted April 25, 2007 Author Share Posted April 25, 2007 DANG how you people can be some genius O_O can i take your brain ?? lol thanks a lot for this string now i think i can handle it i will add the full source code when i am finish with it thanks a lot Link to comment Share on other sites More sharing options...
Gabburd Posted April 25, 2007 Share Posted April 25, 2007 Glad to be of help! 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