I’ve looked through the eggPlant/SenseTalk guides and I’m not having luck finding a means to do something.
I’ve created a list of nested lists…
Set listOfChars To {
(a, b, c), (1, 2, 3), (d, e, f), (4, 5, 6), (g, h, i)
}
I want to reference the elements in each nested list
Repeat until last item in listOfChars is reached
Put //a
Put //b
Put //c
End repeat
What is the syntax to reference each value in each nested list?
Thanks,
~ Doug
Hello Doug,
You can accomplish this action with a nested repeat. Here is a sample script that shows what the code looks like:
put ((“a”,“b”,“c”),(1,2,3)) into listOfChars
repeat with each sublist of listOfChars – the repeat is acting upon each item of listofChar, and I chose to refer to those items with a variable I called “sublist”
repeat with each item of sublist
put it
end repeat
end repeat
Let us know if any other questions come up.
Sincerely,
Carrie