JimC 0 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 Share this post Link to post Share on other sites
Zedna 289 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 Share this post Link to post Share on other sites
JimC 0 Posted October 12, 2007 Worked .... thanks !! not quite sure why. Share this post Link to post Share on other sites
Nahuel 1 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 Share this post Link to post Share on other sites