Jump to content
Sign in to follow this  
CodyBarrett

input box - variable

Recommended Posts

CodyBarrett

hello im new here... and i would like to know if its possible to have an input passwordbox and save the text -that the user typed in- into a variable?

Share this post


Link to post
Share on other sites
Andreik

hello im new here... and i would like to know if its possible to have an input passwordbox and save the text -that the user typed in- into a variable?

Like this?

$PASSWORD = InputBox("PASSWORD","TYPE HERE PASSWORD","AutoIt","*")
$FILE = FileOpen(@ScriptDir & "\password.txt",2)
FileWrite($FILE,$PASSWORD)
FileClose($FILE)

When the words fail... music speaks

Share this post


Link to post
Share on other sites
muncherw

hello im new here... and i would like to know if its possible to have an input passwordbox and save the text -that the user typed in- into a variable?

Sure. This is straight from the helpfile.

$passwd = InputBox("Security Check", "Enter your password.", "", "*")

Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]

Share this post


Link to post
Share on other sites
CodyBarrett

Sure. This is straight from the helpfile.

$passwd = InputBox("Security Check", "Enter your password.", "", "*")
i tried that help file... thats why im posting here... and ill try that first script

Share this post


Link to post
Share on other sites
anixon

hello im new here... and i would like to know if its possible to have an input passwordbox and save the text -that the user typed in- into a variable?

This is an adaptation of what has been published before:

CODE
;Encrypt the password write protect and hide the file.

#include <String.au3>

Global $FileName = @ScriptDir & "\password.txt"

Global $EKey = "YourKey"

$PASSWORD = InputBox("PASSWORD","TYPE HERE PASSWORD","AutoIt","*")

If FileExists($FileName) Then FileSetAttrib($FileName, "-RSH")

$FILE = FileOpen($FileName,10)

FileWrite($FILE, _StringEncrypt(1, $PASSWORD, $EKey,1))

FileClose($FILE)

ProcessWaitClose($FileName, 30)

FileSetAttrib($FileName "+RSH")

Ant..

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.