Sign in to follow this  
Followers 0

Load And Save Txt

3 posts in this topic

OK so im fairly new to autoit and even with the help me file im still having problems to grasp the principles..but im learning :)

i want to script a GUI that loads up a txt file , makes a combo list box at the top with a pull down in wich are all the account names ( all info before the first $delim..all items in one line are seperated by $delims anyway..) and when you choose one from the list loads up all the info in the right editbox ( $name , $adress , etc..) you can then edit the boxes you want and save back to .txt at the right line chosen ( if its account on line 9 it overwrites the line 9..

So..up to now this is what i understood of autoit

GuiCreate("Accounts and Info", 640, 480,)


$file = FileOpen("accounts.txt", 0)

$line = FileReadLine(($file) , 1)

$line1 = FileReadLine(($file) , 2)

$line2 = FileReadLine(($file) , 3)

$line3 = FileReadLine(($file) , 4)

$line4 = FileReadLine(($file) , 5)

$line5 = FileReadLine(($file) , 6)

this works but loads the entire line..i only want to load whats between the start of the line and the first $delim

GUICtrlCreateCombo ("accounts", 10,10) ; create first item

GUICtrlSetData(-1,"$line1|$line2","$line3") ; add other item snd set a new default

i know this dosent work at all..but its all i came up with..

if anyone has a good tutorial on the subject or could help me out on this i really would appreciate it ... not much tutorial sites on the subject but i learn pretty fast :(

Any help would be greatly appreciated..



Share this post

Link to post
Share on other sites

im going to bed but one quick suggestion, use a INI file :)

Share this post

Link to post
Share on other sites

#3 ·  Posted (edited)

inread and iniwrite work by section right? but i want all the text to be on 1 line with "," seperating the info.. :/ i need one file that holds all the accounts.

Edited by melf

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