JimC Posted October 12, 2007 Posted October 12, 2007 I verify that there is information in the array and I want to write it our to another file, but it seems to just skip over the for loop. The msgbox under the for loop never occurs. Any help would be greatly appreciated. If Not _FileReadToArray($xpcd &"\I386\WINNT.SIF",$arr4) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf _ArrayDisplay($arr4) For $u = 1 to _ArrayMaxIndex($arr4) - 1; counter for array msgbox(1,"",$arr4[$u]) _FileWriteToLine($ImageBuild,$linecount1,$arr4[$u]) $linecount1=$linecount1+1 Next
Zedna Posted October 12, 2007 Posted October 12, 2007 instead of For $u = 1 to _ArrayMaxIndex($arr4) - 1; counter for array try For $u = 1 to UBound($arr4) - 1; counter for array Resources UDF ResourcesEx UDF AutoIt Forum Search
JimC Posted October 12, 2007 Author Posted October 12, 2007 Worked .... thanks !! not quite sure why.
Nahuel Posted October 12, 2007 Posted October 12, 2007 (edited) Maybe this will answer: #include <Array.au3> Dim $myarray[8]=[1,2,3,4,5,12] $max=_ArrayMaxIndex($myarray);Returns the index where the highest value occurs in the array. MsgBox(0,"",$max) $max1=UBound($myarray);Returns the size of array dimensions. MsgBox(0,"",$max1) Edited October 12, 2007 by Nahuel
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