Jump to content

increase the value of a number by one HOW?


 Share

Recommended Posts

Ok so been reading the help me file and the forum for over an hour it's seem like it should be so easy yet i think i'm completely off

Here is what i have i dont think i'm on the right track

I would like the x value to increased by one each time the loop is ran

do
$x= 1;need to be  increased by one
$file = FileOpen("test.txt", 0)

$Number = FileReadline($file, $x) 


$x = $x +1

MsgBox(0, "The Number is", $Number)

Until $x=5

FileClose($file)

thank you in advance for any help

Edited by MazeMiami
Link to comment
Share on other sites

$x= 1
do

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

$Number = FileReadline($file, $x) 

MsgBox(0, "Line "&$x, $Number)
$x +=1
Until $x=5

FileClose($file)

everytime the loop start your delcaring it as being 1 again, so it cant move on.

Edited by Aceguy
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
 Share

  • Recently Browsing   0 members

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