fred666777 Posted December 9, 2007 Share Posted December 9, 2007 what would the code be to send the input in inputbox to notepad? so if someone typed there name into the box it would say hello name typed in inputbox Link to comment Share on other sites More sharing options...
rasim Posted December 9, 2007 Share Posted December 9, 2007 This? $Input = InputBox("TestInput", "Input data", "Hello world") Run("notepad.exe") WinWait("Untitled") ControlSend("Untitled", "", "Edit1", $Input) Link to comment Share on other sites More sharing options...
fred666777 Posted December 9, 2007 Author Share Posted December 9, 2007 thats what i was looking for but not it. how would i get it so i could have this password code #include <GUIConstants.au3> #include <String.au3> $File = IniWrite("my pass.ini" , "password" , "1" , _StringEncrypt(1 , "password" , "" , 1)) $Pass = IniRead($File , "YourPasswordHere" , "1" , "YourPasswordHere") $Form1 = GUICreate("Password Dialog", 252, 150, 0, 0) $MaskEdit1 = GUICtrlCreateInput("", 8, 32, 233, 21 , $ES_PASSWORD,$ES_AUTOHSCROLL) $passinput = GUICtrlCreateInput("", 8, 70, 233, 21, $es_password, $es_autohscroll) $Button1 = GUICtrlCreateButton("&OK", 86, 120, 75, 25, 0) $Button2 = GUICtrlCreateButton("&Cancel", 167, 120, 75, 25, 0) $Label1 = GUICtrlCreateLabel("Enter password", 8, 12, 77, 17) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 If $Pass = GUICtrlRead($MaskEdit1) Then ExitLoop Else MsgBox(0 , "" , "Wrong password") EndIf Case $Button2 Exit EndSwitch WEnd except have it so w/e you type in box #2($passinput) would be the password i tried diff things and couldnt get it to work Link to comment Share on other sites More sharing options...
rasim Posted December 10, 2007 Share Posted December 10, 2007 Sorry, i understand english very bad, you need this? expandcollapse popup#include <GUIConstants.au3> #include <String.au3> $File = @ScriptDir & "\my pass.ini" IniWrite($File , "password" , "1" , _StringEncrypt(1 , "password" , "Ђ" , 1)) $Form1 = GUICreate("Password Dialog", 252, 150, 0, 0) $MaskEdit1 = GUICtrlCreateInput("", 8, 32, 233, 21 , $ES_PASSWORD,$ES_AUTOHSCROLL) $passinput = GUICtrlCreateInput("", 8, 70, 233, 21, $ES_PASSWORD, $ES_AUTOHSCROLL) $Button1 = GUICtrlCreateButton("&OK", 86, 120, 75, 25, 0) $Button2 = GUICtrlCreateButton("&Cancel", 167, 120, 75, 25, 0) $Label1 = GUICtrlCreateLabel("Enter password", 8, 12, 77, 17) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $Pass1 = GUICtrlRead($MaskEdit1) $Pass2 = GUICtrlRead($passinput) $Encrypt = _StringEncrypt(0, IniRead($File , "password" , "1" , "None"), "Ђ", 1) If ($Pass1 = $Encrypt) And ($Pass2 = $Encrypt) Then MsgBox(0, "Yes", "Success") ExitLoop Else MsgBox(0 , "" , "Wrong password") EndIf Case $Button2 ExitLoop EndSwitch WEnd Link to comment Share on other sites More sharing options...
fred666777 Posted December 10, 2007 Author Share Posted December 10, 2007 that is Very close to it, but insted of having to enter the password in 2 times i want it to be so say you typed "asdf" in box 2 then that would be the password or if you typed "1234" in box 2 then that would be the password is that possable? if not do you know a code so it saves there password?(like on most programs) Link to comment Share on other sites More sharing options...
Nahuel Posted December 10, 2007 Share Posted December 10, 2007 FileWrite? IniWrite? Link to comment Share on other sites More sharing options...
fred666777 Posted December 11, 2007 Author Share Posted December 11, 2007 (edited) ok i guess what im really asking for is something like $Input = InputBox("TestInput", "Input data", "Hello world") Run("notepad.exe") WinWait("Untitled") send($input(what code would go here to send w/e is in $input?)) Edited December 11, 2007 by fred666777 Link to comment Share on other sites More sharing options...
Richard Robertson Posted December 11, 2007 Share Posted December 11, 2007 This? $Input = InputBox("TestInput", "Input data", "Hello world") Run("notepad.exe") WinWait("Untitled") ControlSend("Untitled", "", "Edit1", $Input) This is the code you want. Just like it was posted near the top. Link to comment Share on other sites More sharing options...
fred666777 Posted December 11, 2007 Author Share Posted December 11, 2007 idk how to explain it... ok so let me try one more time. if on page one it says set your password. then when you click ok then it opens a program then when you close it then it will say password? and if you enter in what you did in the first page then it goes to the next screen. make any sense to you? Link to comment Share on other sites More sharing options...
fred666777 Posted December 11, 2007 Author Share Posted December 11, 2007 if it doesnt then can you give me a new password code so when they open the program the first time then they can set it and then from then on it stays the same? Link to comment Share on other sites More sharing options...
Nahuel Posted December 11, 2007 Share Posted December 11, 2007 idk how to explain it...ok so let me try one more time.if on page one it says set your password. then when you click ok then it opens a program then when you close it then it will say password? and if you enter in what you did in the first page then it goes to the next screen. make any sense to you? no.. not at all...Could you explain why it has to be in notepad? why do you have to send the password there? Link to comment Share on other sites More sharing options...
fred666777 Posted December 11, 2007 Author Share Posted December 11, 2007 (edited) i dont just need a password code know of a good one? Edited December 11, 2007 by fred666777 Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted December 29, 2007 Share Posted December 29, 2007 Heres A Little Code That Asks You To Set A Password Then When You Click Continue It Asks For The Password To Continue If The Password Is Wrong You Get An Error If It Right You Get To Continue! I Hope This Helps... #include <String.au3> $Input = InputBox ( "InputBox", "Please Type In A Password And Press Ok" & @CRLF & "" & @CRLF & "" & @CRLF & "" & @CRLF & "Password :", "", "*") IniWrite ( "Settings.ini", "User", "Password", _StringToHex($Input)) $MsgBox = MsgBox (4, "Continue?", "Ready To Continue?",0) If $MsgBox = 7 Then Exit EndIf If $MsgBox = 6 Then Call ("_Continue") EndIf Func _Continue() $Read = IniRead ( "Settings.ini", "User", "Password", "") $DeHexRead = _HexToString ($Read) $Input_2 = InputBox ( "InputBox", "Password Is Needed To Continue" & @CRLF & "Please Type In Your Password","","*") If $DeHexRead = $Input_2 Then MsgBox (0, "MsgBox", "Yay! Correct Password!",0) Exit EndIf MsgBox (0, "MsgBox", "Error! InCorrect Password!",0) EndFunc --John O. Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
Nevin Posted December 29, 2007 Share Posted December 29, 2007 The language barriers are always horrendous. I feel like I need a youtube video explaining what people want half the time. 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