Jump to content
Sign in to follow this  
VerteXslaPPy

Save my Ctrlinput into a .txt file

Recommended Posts

VerteXslaPPy

 Hello, i want that my Login save my Username and Password

$hInput_Benutzername = GUICtrlCreateInput("", 70, 12, 210, 21)
$hInput_Passwort = GUICtrlCreateInput("", 70, 36, 210, 21, $ES_PASSWORD)
what i tried :
$filetxt = FileOpen(@ScriptDir & "\login.txt", 2)
Case $hButton_Login
           If _IsChecked($savelogin) Then
                  FileWrite($filetxt, $hInput_Benutzername & @CRLF)
                  FileWrite($filetxt, $hInput_Benutzername)
                 EndIf
 

 

Edited by VerteXslaPPy

Share this post


Link to post
Share on other sites
VerteXslaPPy

thank you worked directly =)

Share this post


Link to post
Share on other sites
VerteXslaPPy

i used now this :

$hInput_Benutzername = GUICtrlCreateInput(-->$lol1<--, 70, 12, 210, 21)
$hInput_Passwort = GUICtrlCreateInput(-->$lol2<--, 70, 36, 210, 21, $ES_PASSWORD)

Case $hButton_Login
           If _IsChecked($savelogin) Then
              $lol1 = GUICTRLREAD($hInput_Benutzername)
              $lol2 = GUICTRLREAD($hInput_Passwort)
                  FileWrite($filetxt, $lol1 & @CRLF)
                  FileWrite($filetxt, $lol2)

                 EndIf

 

 

but how i use $lol1 and $lol2 now in the Input Boxes?

 

sorry but how i use correctly IniRead to read perfect from line 1 and iniread to read from line 2?

 

thats should be do an simple save login

 

sorry for my bad english

Edited by VerteXslaPPy

Share this post


Link to post
Share on other sites
Jos

Something close to this:

$lol1 = IniRead($filetxt, "Main", "Userid", "")
$lol2 = IniRead($filetxt, "Main", "Password", "")
$hInput_Benutzername = GUICtrlCreateInput($lol1, 70, 12, 210, 21)
$hInput_Passwort = GUICtrlCreateInput($lol2, 70, 36, 210, 21, $ES_PASSWORD)

Case $hButton_Login
    If _IsChecked($savelogin) Then
        $lol1 = GUICtrlRead($hInput_Benutzername)
        $lol2 = GUICtrlRead($hInput_Passwort)
        IniWrite($filetxt, "Main", "Userid", $lol1)
        IniWrite($filetxt, "Main", "Password", $lol2)
    EndIf

Jos

  • Like 1

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
VerteXslaPPy

i will try it later im to tired now

Share this post


Link to post
Share on other sites
VerteXslaPPy

Never mind solved .... :D im dumb haha

 

so , thank you for your help mate ;)

Edited by VerteXslaPPy

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  

×