Jump to content

Recommended Posts

Posted

You are the OP. :-)

OP = the person who made the Original Post or the Original Post itself - depending on how it is used.

When you use StingSplit, it puts the info into an Array like this:

$FileArray[0] = 16 <--- this will be how many numbers are in your input file

$FileArray[1] = 07566276.001

$FileArray[2] = 07566276.002

----------

EDIT:

So For $i = 1 To $FileArray[0]

becomes For $i = 1 To 16

Each time thru the loop, $i increments by 1 (by default)

This allows you to work thru an array with ease.

----------

The first time thru the loop, this line:

StringMid($FileArray[$i], 9, 4)

will be:

StringMid($FileArray[1], 9, 4)

It [StringMid] is reading this number...

07566276.001

123456789

starting at the 9th position [which is the decimal]

and returning 4 characters [.001]

so, StringMid($FileArray[1], 9, 4) = ".001"

becomes

".001" = ".001"

and If ".001" = ".001" then write that line to the file*

*or you might want to trim the leading 0

hope this helps

Edit2: [in bold]

Edit3: hope that was not too insulting...

I was unsure about what you were unsure about.

No, not insulted at all. You answered my question perfectly. I have no formal training in writing scripts or programming. I am just learning as I go. That is the way I have been learning HTML, T-SQL, ASP, and now Autoit. Problem with learning this way is that it can leave some gaps in your knowledge, but on the other hand I tend to learn faster by doing than by reading a book. Thanks for taking the time to explain this to me. It helps me not only complete my project, but gets me one step closer to understanding what I am doing. :rolleyes: Thanks again.

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...