Jump to content

Func FileReadLine

Recommended Posts

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,



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

$line = 0

While 1

FileReadLine("addition.txt", $line)

$line = $line + 1


i tried this but how can i tell my script now

to store the line in $number

Edited by sd333221
Link to comment
Share on other sites

$number = FileReadLine("addition.txt", $line)


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

works try it if you want

Edited by sd333221
Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...