Jump to content
Sign in to follow this  

How to read in information from external files

Recommended Posts


okay, so im not really sure if this is possible for autoit and im not really sure what to look for by searching, so if this is possible, if someone could please explain to me the basis to how it is done or lead me to somewhere to look so i can learn that way

basically i have a script that runs multiple different programs...however...instead of always asking the user for their login, or a list of constants for every program what i want is to have a txt file or whatever file autoit can read from that the user can edit. then have the program read the information from that file.


; information.txt << - the file

; inside the file

Username: dorkbrains

password: xxyyxxyy

city: las vegas

state: nevada

then have the autoit program somehow call that information...how would this be done?

Share this post

Link to post
Share on other sites

See the Ini Funcrions in the help file

$sIni = @ScriptDir & "\Settings.ini"
IniWrite($sIni, "dorkbrains", "Password", "xxyyxxyy")
IniWrite($sIni, "dorkbrains", "City", "las vegas")
IniWrite($sIni, "dorkbrains", "State", "nevada")

Then use IniRead to recover the data


Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver: - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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