Hello all,

I'm looking to add a bit to a script which asks for a list (imagine it's like a shopping list). It needs to start by asking for how many items when someone enters a command, which is easy enough, but then ask for a description of each individual item.

Starting it is easy, as it just needs something like

set %items $?="How many items?"

but I can't get it to count through the items one by one and ask for a description; I'm not sure how to define the variables. I can define another variable like %count = 1, and then run a simple loop that adds 1 to %count on every loop until %count = %items. But how do I define the output of that loop? I want each run through the loop to produce an output like %item1 then %item2 then %item3, so these can be all referenced later, but I defining the items as %item%count doesn't work.

As a more advanced feature, if the command is re-run later, I'd like it to add to the number of items; so if you set the number of items to 2, then define them, and then run the command again and set the number of items to 3, it'll just ask you for the 3rd item's description and preserve 1 and 2.

I'm sorry for the really wordy first post, and sorry to blunder in with a really irritating request, but I hope someone can help me!