Jump to content

How to read informations from Inputbox


Recommended Posts

Hi,

I want to read some information out of an inputbox and want to save it in a .ini

But this is the inioutput:

[Login]
Name=0
Encrypt=

$pass = "random"
            
            
            $inputacc = InputBox("Account", "Gib bitte deinen Account namen ein")
            $inputacc2 = GuiCtrlread($inputacc)
            iniwrite("manager.ini", "Login", "Name", GuiCtrlread($inputacc2))
            $inputpasswort = InputBox("Passwort", "Gib bitte dein Passwort ein")
            $inputpasswort2 = GuiCtrlRead($inputpasswort)
            $Encrypt = _StringEncrypt(1, $inputpasswort2, $pass, 2);Encrypt $password with Encryption password at level 1
            iniwrite("manager.ini", "Login", "Encrypt", $Encrypt)

so wtf can I do?

Link to comment
Share on other sites

Try something like this:

#include <String.au3>
$pass = "random"
$input = InputBox("Account", "Gib bitte deinen Account namen ein")
if @error then 
    MsgBox(0,"Fehler","Eingabe abgebrochen")
    Exit
endif
IniWrite("manager.ini", "Login", "Name", $input)
$input = InputBox("Passwort", "Gib bitte dein Passwort ein")
if @error then 
    MsgBox(0,"Fehler","Eingabe abgebrochen")
    Exit
endif
IniWrite("manager.ini", "Login", "Passwort", $input)
IniWrite("manager.ini", "Login", "Encrypt", _StringEncrypt(1, $input, $pass, 2))
Edited by KaFu
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...