Sign in to follow this  
Followers 0
fred666777

send input to notepad

14 posts in this topic

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

Share this post


Link to post
Share on other sites



This?

$Input = InputBox("TestInput", "Input data", "Hello world")
Run("notepad.exe")
WinWait("Untitled")
ControlSend("Untitled", "", "Edit1", $Input)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

:)

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

FileWrite? IniWrite? :)

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by fred666777

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

i dont just need a password code :)

know of a good one?

Edited by fred666777

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

The language barriers are always horrendous. I feel like I need a youtube video explaining what people want half the time. :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0