I'm working on making a repeat loop to put items into an array. I'm using a repeat with loop and want to use the counter variable to also tell the program what key to store the data in within the array.
It will look something like this:
Code: Select all
put 1 into y
repeat with y = 1 to 12
put any line of tCurrFiles into targetArray[y]
delete current line of tCurrFiles
add 1 to y
end repeat
Code: Select all
put any line of tCurrFiles into targetArray[1]
delete current line of tCurrFiles
set the filename of img "Image 1" to targetArry[1]
I guess my question is does an array (or other data and control structures; I've had a similar problem with a get random type structure) use the x in the same way it does the one--as in it reads the x as the key--or will it use the data stored within x as the key--in this case the numbers 1 through 12?
Thank you so much for your help!
Jeff