williamk Posted June 13, 2007 Author Posted June 13, 2007 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. Thanks again.
herewasplato Posted June 15, 2007 Posted June 15, 2007 ...Thanks again.You are welcome.It was a fun thread. [size="1"][font="Arial"].[u].[/u][/font][/size]
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