sd333221 Posted July 3, 2005 Posted July 3, 2005 (edited) Hi all,i am new to autoit and have a question.I want my script to read the first line ofaddition.txt store it into $number and thenread the secound line of addition.txt and store it to number again (this will overwritetha last number).i hope you understand me thx alot, sd333221Edit: Quote $file = FileOpen("addition.txt", 0)$line = 0While 1FileReadLine("addition.txt", $line)$line = $line + 1Wendi tried this but how can i tell my script nowto store the line in $number Edited July 3, 2005 by sd333221
Developers Jos Posted July 3, 2005 Developers Posted July 3, 2005 $number = FileReadLine("addition.txt", $line) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
sd333221 Posted July 3, 2005 Author Posted July 3, 2005 (edited) JdeB said: $number = FileReadLine("addition.txt", $line)<{POST_SNAPBACK}>Uhhh Now i understand how this works!!!Thx alot that was a great help. $file = FileOpen("test.txt", 0) $line = 1 While 1 $number = FileReadLine("test.txt", $line) $line = $line + 1 MsgBox(0,"Try","This was line " & $line & ", Output: " & $number & " was detected on line " & $line & "!") Wendworks try it if you want Edited July 3, 2005 by sd333221
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now