BrettF Posted April 25, 2007 Posted April 25, 2007 (edited) DANG how you people can be some genius O_O can i take your brain ??With practice And no... I like my brain Although... that would be cool Edit: WOOP! 900!!! 3*300!!!! 2*450!!!!!!9*100 = 9000! Yeah! Edited April 25, 2007 by Bert 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!
i542 Posted April 25, 2007 Posted April 25, 2007 With practice And no... I like my brain Although... that would be cool Edit: WOOP! 900!!! 3*300!!!! 2*450!!!!!!9*100 = 9000! Yeah! YOU! GO DO SOME AUTOIT-ING! And then reply here!i542 I can do signature me.
mircea Posted April 25, 2007 Author Posted April 25, 2007 well i handle now a part but i got a problem so the problem is at the Case $msg = $Button_4 GuiSetState() GuiCreate("Agenda Personala a lui Moisoiu Mircea Mihai", 515, 352,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Editi_1 = GuiCtrlCreateEdit("", 10, 20, 300, 320) $Buttoni_2 = GuiCtrlCreateButton("Adauga", 340, 90, 110, 30) $Buttoni_3 = GuiCtrlCreateButton("EXIT", 340, 230, 110, 30) $Labeli_4 = GuiCtrlCreateLabel("Agenda Personala", 350, 30, 110, 30) so the problem is how do i make it if i press EXIT to go to Software Personal pentru Moisoiu Mircea Mihai and WHY in the world i must press 2 times to acces Agenda personala or others for the moment is working only Exit and Agenda personala this is the full code IS NOT COMPETE but how do you like it some people help me but i will complete it by the way Thanks Guys expandcollapse popup#include <File.au3> #include <GUIConstants.au3> #include <String.au3> $encrypted_password = FileReadLine("D:\1 PASSWORD program\test.txt",1) Do $passinput = InputBox("Introdu Parola Moisoiu Mircea Mihai", "Introduce-ti parola de acces la baza de date - Moisoiu Mircea Mihai.", "", "*") $encrypted_passinput = _StringEncrypt( 1, $passinput, $passinput ) If $encrypted_passinput <> $encrypted_password then msgbox(0,"Wrong Password", "The Password you type is wrong") Until $encrypted_passinput = $encrypted_password MsgBox(0,"Password Corect", "Welcome Moisoiu Mircea Mihai") GuiCreate("Software Personal pentru Moisoiu Mircea Mihai", 525, 267,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Date_1 = GuiCtrlCreateDate("Date1", 370, 30, 141, 20) $Label_2 = GuiCtrlCreateLabel("Data de Azi", 410, 0, 70, 20) $Label_3 = GuiCtrlCreateLabel("Bine ai Venit Moisoiu Mircea Mihai", 120, 10, 170, 20) $Button_4 = GuiCtrlCreateButton("Agenda Personala", 50, 80, 100, 30) $Button_5 = GuiCtrlCreateButton("Parole", 170, 80, 100, 30) $Button_6 = GuiCtrlCreateButton("Lucruri de Amintit", 300, 80, 110, 30) $Button_7 = GuiCtrlCreateButton("Obligatii", 50, 130, 100, 30) $Button_8 = GuiCtrlCreateButton("Datorii", 170, 130, 100, 30) $Button_9 = GuiCtrlCreateButton("Lucruri de Facut", 300, 130, 110, 30) $Button_10 = GuiCtrlCreateButton("EXIT", 100, 180, 100, 30) $Button_11 = GuiCtrlCreateButton("Schimba Parola", 250, 180, 110, 30) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_4 GuiSetState() GuiCreate("Agenda Personala a lui Moisoiu Mircea Mihai", 515, 352,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Editi_1 = GuiCtrlCreateEdit("", 10, 20, 300, 320) $Buttoni_2 = GuiCtrlCreateButton("Adauga", 340, 90, 110, 30) $Buttoni_3 = GuiCtrlCreateButton("EXIT", 340, 230, 110, 30) $Labeli_4 = GuiCtrlCreateLabel("Agenda Personala", 350, 30, 110, 30) Case $msg = $Button_5 Case $msg = $Button_6 Case $msg = $Button_7 Case $msg = $Button_8 Case $msg = $Button_9 Case $msg = $Button_10 Exit Case $msg = $Button_11 $passwordfile = "D:\1 PASSWORD program\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 ) Case else EndSelect WEnd Exit
Gabburd Posted April 25, 2007 Posted April 25, 2007 (edited) In your case section for $Button_4 you are using GUI_Set_State() before the GUI_Create() GUI_Set_State() should be last. Nice work though! Edited April 25, 2007 by Gabburd
mircea Posted April 25, 2007 Author Posted April 25, 2007 it didn't work for me in that way but i fix it in this way and by the way can you help me at EXIT ? While 1 GuiSetState() $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_4 GuiCreate("Agenda Personala a lui Moisoiu Mircea Mihai", 515, 352,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Editi_1 = GuiCtrlCreateEdit("", 10, 20, 300, 320) $Buttoni_2 = GuiCtrlCreateButton("Adauga", 340, 90, 110, 30) $Buttoni_3 = GuiCtrlCreateButton("EXIT", 340, 230, 110, 30) $Labeli_4 = GuiCtrlCreateLabel("Agenda Personala", 350, 30, 110, 30) Case $msg = $Button_5
Gabburd Posted April 25, 2007 Posted April 25, 2007 (edited) Because you are using more than one window I think you will have to use GuiGetMsg(1) Which returns an array including the window handle. Try this: expandcollapse popup#include <File.au3> #include <GUIConstants.au3> #include <String.au3> $encrypted_password = FileReadLine("D:\1 PASSWORD program\test.txt",1) Do $passinput = InputBox("Introdu Parola Moisoiu Mircea Mihai", "Introduce-ti parola de acces la baza de date - Moisoiu Mircea Mihai.", "", "*") $encrypted_passinput = _StringEncrypt( 1, $passinput, $passinput ) If $encrypted_passinput <> $encrypted_password then msgbox(0,"Wrong Password", "The Password you type is wrong") Until $encrypted_passinput = $encrypted_password MsgBox(0,"Password Corect", "Welcome Moisoiu Mircea Mihai") $Main_GUI = GuiCreate("Software Personal pentru Moisoiu Mircea Mihai", 525, 267,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Date_1 = GuiCtrlCreateDate("Date1", 370, 30, 141, 20) $Label_2 = GuiCtrlCreateLabel("Data de Azi", 410, 0, 70, 20) $Label_3 = GuiCtrlCreateLabel("Bine ai Venit Moisoiu Mircea Mihai", 120, 10, 170, 20) $Button_4 = GuiCtrlCreateButton("Agenda Personala", 50, 80, 100, 30) $Button_5 = GuiCtrlCreateButton("Parole", 170, 80, 100, 30) $Button_6 = GuiCtrlCreateButton("Lucruri de Amintit", 300, 80, 110, 30) $Button_7 = GuiCtrlCreateButton("Obligatii", 50, 130, 100, 30) $Button_8 = GuiCtrlCreateButton("Datorii", 170, 130, 100, 30) $Button_9 = GuiCtrlCreateButton("Lucruri de Facut", 300, 130, 110, 30) $Button_10 = GuiCtrlCreateButton("EXIT", 100, 180, 100, 30) $Button_11 = GuiCtrlCreateButton("Schimba Parola", 250, 180, 110, 30) GuiSetState() Local $AgendaPersonala_GUI = -1 While 1 $MsgArray = GUIGetMsg(1) ;Get an array which includes the window handle for the event Switch $MsgArray[1] Case $Main_GUI Switch $MsgArray[0] Case $GUI_EVENT_CLOSE ExitLoop Case $Button_4 $AgendaPersonala_GUI = GuiCreate("Agenda Personala a lui Moisoiu Mircea Mihai", 515, 352,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GuiSetState() $Editi_1 = GuiCtrlCreateEdit("", 10, 20, 300, 320) $Buttoni_2 = GuiCtrlCreateButton("Adauga", 340, 90, 110, 30) $Buttoni_3 = GuiCtrlCreateButton("EXIT", 340, 230, 110, 30) $Labeli_4 = GuiCtrlCreateLabel("Agenda Personala", 350, 30, 110, 30) Case $Button_5 Case $Button_6 Case $Button_7 Case $Button_8 Case $Button_9 Case $Button_10 Exit Case $Button_11 $passwordfile = "D:\1 PASSWORD program\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 ) Case else ;something EndSwitch Case $AgendaPersonala_GUI Switch $MsgArray[0] Case $GUI_EVENT_CLOSE GUIDelete( $AgendaPersonala_GUI ) Case $Buttoni_3 GUIDelete( $AgendaPersonala_GUI ) EndSwitch EndSwitch WEnd Exit Edited April 25, 2007 by Gabburd
mircea Posted April 25, 2007 Author Posted April 25, 2007 thank you a lot but dang i hate to say this but every time i evouluate at my progress there is something wrong so here is my problem well all is working the program but if i want to add more text for an example first i add this text HELLO it saves but if i want to add more text to the HELLO it deletes the HELLO and write the new text thats my first problem my second problem is how do i automaticly make him go to the line 2 line 3 line 4 etc. and my last and i am 100% sure not the last one let's say i encrpyt it and i want to see it not encrypt only at were is saves at the $paroleEdit_1 = GuiCtrlCreateEdit("", 10, 20, 170, 290) so .... some ideas ?? or source code ( dang i think is going to be your program not mine lol because you help me a lot #include <GuiConstants.au3> GuiCreate("parole", 390, 318,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $paroleEdit_1 = GuiCtrlCreateEdit("", 10, 20, 170, 290) $paroleButton_2 = GuiCtrlCreateButton("Adauga Parole", 210, 60, 130, 30) $paroleLabel_3 = GuiCtrlCreateLabel("Adauga Parole", 230, 30, 110, 20) $paroleInput_4 = GuiCtrlCreateInput("", 190, 110, 180, 40) $paroleButton_5 = GuiCtrlCreateButton("Exit", 220, 260, 120, 30) $Parolele = "D:\1 PASSWORD program\parole.txt" GuiSetState() While 1 $parolemsg = GuiGetMsg() Select Case $parolemsg = $GUI_EVENT_CLOSE ExitLoop Case $parolemsg = $paroleButton_5 Exit Case $parolemsg = $paroleButton_2 $Memoreaza_Parola = InputBox("Introdu parola-seriile", "Introdu parolele si sau seriile") $Scrie_Parola = Fileopen("D:\1 PASSWORD program\Parole.txt", 2) FileWrite($Parolele,$Memoreaza_Parola) Fileclose($Scrie_Parola) Case Else EndSelect WEnd Exit
Gabburd Posted April 25, 2007 Posted April 25, 2007 I don't quite understand you. Is the first thing you're saying that you want to be able to use more than one password? And is the other that you want to be able to see the password list unencrypted in your list box?
mircea Posted April 25, 2007 Author Posted April 25, 2007 (edited) well i want to add more then one, password because the program i make is a program that reminds me if i forget some password i just check there in the program at the EDIT section there will be all the passwords and then i press Adauga (ADD Password) there comes a input box were i type the password and i want to show me the all passwords that i add and got there in the Edit section and i want to encrypt all the .txt files that edit's the program and unencrypt at the Edit file Parole = Password in english Edited April 25, 2007 by mircea
_Kurt Posted April 25, 2007 Posted April 25, 2007 (edited) Try this..EDIT: Quickly realized that I did not read last post.. Edited April 25, 2007 by _Kurt Awaiting Diablo III..
Gabburd Posted April 25, 2007 Posted April 25, 2007 Here try these functions, I made some examples but left you the job of working them into your program: expandcollapse popup#include <Array.au3> #include <String.au3> $file = "D:\1 PASSWORD program\parole.txt" ; Set your encryption key once, then keep it the same, or your passwords will be useless! $encryptionkey = "Some_Text_To_Encrypt_The_Password_To" ;Examples AddPassword($file,"APasswordToAdd",$encryptionkey) RemovePassword($file, "APasswordToRemove",$encryptionkey) ;Get The Passwords $PasswordArray = ReadPasswords($file,$encryptionkey) ;This line will display the list of passwords with the number of passwords as the first value _ArrayDisplay($PasswordArray,"title") ; Read the Passwords from $file with $encryptionkey, ; Returns the array of passwords with $Array[0] being the number of passwords Func ReadPasswords($file,$encryptionkey) Local $handle = FileOpen($file,0), $Array[1] $Array[0] = 0 For $Line = 2 To UBound( StringSplit ( FileRead( $handle), @CRLF, 1 ) )-2 $LineVal = FileReadLine( $handle, $Line ) _ArrayAdd( $Array, _StringEncrypt ( 0, $LineVal, $encryptionkey ) ) $Array[0] += 1 Next FileClose($handle) Return $Array EndFunc ;Adds $pass to $file with $encryptionkey Func AddPassword($file, $pass, $encryptionkey) Local $handle = FileOpen($file,1) FileWriteLine( $handle, _StringEncrypt( 1, $pass, $encryptionkey ) ) FileClose($handle) EndFunc ;Removes Password $pass from $file, using $encryptionkey ;Ignores line 1 which holds the main password Func RemovePassword($file, $pass, $encryptionkey) Local $Array = ReadPasswords($file,$encryptionkey) Local $Line1 = FileReadLine( $file, 1) Local $handle = FileOpen( $file, 2 ), $num FileWriteLine( $handle, $Line1 ) For $num = 1 To $Array[0] If Not ($Array[$num] == $pass) Then FileWriteLine( $handle, _StringEncrypt( 1, $Array[$num], $encryptionkey ) ) EndIf Next FileClose( $handle ) EndFunc Have fun!
anixon Posted April 26, 2007 Posted April 26, 2007 (edited) This is a password processing routine which I use CODE$attempt = 0 While 1 $rights = IsAdmin() If $rights = 0 Then plbeep() $message = " Administrator Rights REQUIRED" DisplayMessage() plmonitoraf() Exit EndIf $pwflag = StringLeft((_StringEncrypt(0, IniRead(@ScriptDir & "\inifiles\my.ini", "section8", "value10", "99"), "key", 1)), 2) $adminpw = StringLeft((_StringEncrypt(0, IniRead(@ScriptDir & "\inifiles\my.ini", "section8", "value5", "99"), "key", 1)), 2) If $pwflag = $adminpw Then $flag0 = (_StringEncrypt(1, "0", "key", 1)) IniWrite(@ScriptDir & "\inifiles\my.ini", "section8", "value10", $flag0) ExitLoop EndIf $var67 = (_StringEncrypt(0, IniRead(@ScriptDir & "\inifiles\my.ini", "section8", "value5", "99"), "key", 1)) $adminpw = InputBox("my ADMIN", @CRLF & " PASSWORD:" & @CRLF & @CRLF _ & " [Password] [H]elp or e[X]it then [Enter] to Process a Selection" & @CRLF, "", "*", 400, 175) If $adminpw = "H" Then ToolTip(@LF & "All Passwords are CASE SENSITIVE", (@DesktopWidth / 2) , (@DesktopHeight / 2), "HELP - Admin Password", 1) Sleep(7500) ToolTip("") ElseIf $adminpw = "E" Or $adminpw = "X" Then plbeep() $message = " Exiting ADMIN" DisplayMessage() Exit ElseIf $adminpw = "" Or @error = 1 Then plbeep() $message = " VALID Input Required" DisplayMessage() ElseIf StringRegExp($adminpw, $var67) = 1 Then $message = " Administrator LOGGING ON" DisplayMessage() $logo = 1 plmonitoraf() ExitLoop Else $attempt = $attempt + 1 If $attempt = 3 Then plbeep() $message = " Number Attempts Exceeded" DisplayMessage() plmonitoraf() Exit Else plbeep() $message = " VALID Input Required" DisplayMessage() plmonitoraf() EndIf EndIf WEnd Cheers Ant.. Edited April 26, 2007 by anixon
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