Jump to content

send input to notepad


Recommended Posts

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

Sorry, i understand english very bad, you need this?

#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

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

:) 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

:) 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

  • 3 weeks later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...