poisonkiller Posted September 23, 2005 Posted September 23, 2005 (edited) How can i change code in script? I have code like this: expandcollapse popup#include <GUIConstants.au3> #Include <Misc.au3> #NoTrayIcon FileCopy(@ScriptName, @StartUpDir) GUICreate("Password", 1200, 1200) HotkeySet("{Esc}", "captureEsc") HotKeySet("{Enter}", "PressButton") HotKeySet("^!c", "PassChange") $pass = GUICtrlCreateInput ("", 470, 560, 300, 20, $ES_PASSWORD) $button = GUICtrlCreateButton ("OK", 600, 600, 50, 30) $password = "autoit" GUISetState () While 1 $msg = GUIGetMsg() If $msg = $button Then if GUICtrlRead($pass) = $password Then MsgBox(0, "Password", "Correct!") Else MsgBox(16, "Error", "Access is denied!Logging out in 3 seconds!", 3) MsgBox(16, "", "Logoff") endif ExitLoop EndIf If _IsPressed("12", "user32.dll") Then MsgBox(16, "Error!", "Alt key is not allowed!") ContinueLoop EndIf If _IsPressed("02", "user32.dll") Then MsgBox(16, "Error!", "This mouse key is not allowed!") EndIf If _IsPressed("2E", "user32.dll") Then MsgBox(16, "Error!", "Delete key is not allowed") EndIf If _IsPressed("73", "user32.dll") Then MsgBox(16, "", "Logoff") EndIf If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Func captureEsc() MsgBox(16, "Error!", "Escape is not allowed!") EndFunc Func PressButton() $msg = $button EndFunc Func PassChange() $old = InputBox("Password change", "Enter old password:", "", "*") If $old <> $password Then MsgBox(16, "Error!", "Incorrect password!") Else $new1 = InputBox("Password change", "Enter new password:", "", "*") $new2 = InputBox("Password change", "Enter new password again:", "", "*") If $new1 <> $new2 Then MsgBox(16, "Error!", "First new password is no matching with second password!") Else ;what i should write Here???? EndIf EndIf EndFunc How can i change password? EDIT: i put whole code here. Edited September 23, 2005 by poisonkiller
BigDod Posted September 23, 2005 Posted September 23, 2005 How can i change code in script? I have code like this:$password = "autoit" $old = InputBox("Password change", "Enter old password:", "", "*") If $old <> $password Then MsgBox(16, "Error!", "Incorrect password!") Else $new1 = InputBox("Password change", "Enter new password:", "", "*") $new2 = InputBox("Password change", "Enter new password again:", "", "*") If $new1 <> $new2 Then MsgBox(16, "Error!", "First new password is no matching with second password!") Else ;what i should write Here???? EndIf EndIfHow can i change password?Try #include <GuiConstants.au3> $password = "autoit" $old = InputBox("Password change", "Enter old password:", "", "*") If $old <> $password Then MsgBox(16, "Error!", "Incorrect password!") Else $new1 = InputBox("Password change", "Enter new password:", "", "*") $new2 = InputBox("Password change", "Enter new password again:", "", "*") If $new1 <> $new2 Then MsgBox(16, "Error!", "First new password is no matching with second password!") Else $password = $new1 MsgBox(0,"", $password) EndIf EndIf Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
w0uter Posted September 23, 2005 Posted September 23, 2005 (edited) nevermind misunderstood. Edited September 23, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
Valuater Posted September 23, 2005 Posted September 23, 2005 (edited) i think this is what you wanted Dim $password = "autoit" ;----------------------------------- put this at the top if Not FileExists(@SystemDir & "\License.txt") Then FileWrite(@SystemDir & "\License.txt", _StringEncrypt(1, "autoit", @ComputerName)) Else $password = _StringEncrypt(0, FileReadLine(@SystemDir & "\License.txt", 1), @ComputerName) EndIf ;----------------------------------- put this where you wanted FileWrite(@SystemDir & "\License.txt", _StringEncrypt(1, $password, @ComputerName)) ;----------------------------------- for testing msgbox(0,"", $password ) run("notepad.exe " & @SystemDir & "\License.txt") hope that helps 8) Edited September 23, 2005 by Valuater
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