Sign in to follow this  
Followers 0
sd333221

Func FileReadLine

3 posts in this topic

#1 ·  Posted (edited)

Hi all,

i am new to autoit and have a question.

I want my script to read the first line of

addition.txt store it into $number and then

read the secound line of addition.txt and

store it to number again (this will overwrite

tha last number).

i hope you understand me :)

thx alot,

sd333221

Edit:

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

$line = 0

While 1

FileReadLine("addition.txt", $line)

$line = $line + 1

Wend

i tried this but how can i tell my script now

to store the line in $number

Edited by sd333221

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

$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 & "!")
Wend

works try it if you want

Edited by sd333221

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