Mau75 0 Posted January 7, 2011 Hi,I'm bit new to the scripting side of things, but I need your assistance.I need to create a Loop that will run n times.With each iteration it must take the correnponding number, read that line in an array, and append it to an edit box.Something in the line of:for n to 5 $array[n] read edit box data append data Write datanextIt works if I manually append the edit box, but as soon as I enter the loop with the commands it closes my GUI.Any help welcome as to the best way to do this.Regards Share this post Link to post Share on other sites
jvanegmond 306 Posted January 7, 2011 Can I see your code maybe (or a shortened version of it)? How you describe your script to work should work all the time. Maybe you're using a while loop and your exit condition is never met? github.com/jvanegmond Share this post Link to post Share on other sites
Mau75 0 Posted January 7, 2011 Hi Manadar, Thanx, but I found my problem. It's actually a problem with the values I got back from an UDF (diskpart.au3) for the total amount of volumes found. It was reporting two more entries that was actually returned via the array. So when I go into my for loop I used the for loop counter to reference the array. Since the loop execute two more times it closes the GUI. That's why if I did it manually it worked, since I knew the values... Thanx anyhow. Regards, Share this post Link to post Share on other sites