Will the 4 choices always be on the same lines? Will there always be 4 choices?
The reason I ask is because there are a few ways to go about this.
You could tell your script to waitfor "1.)" and then save the rest of the line to a variable called (something like) "sVar1". And repeat for each new number, afterword you would do a strfind on each variable to find the orange.
That is one way.
Or you could wait until all the choices come out, and assuming there are the same number of choices each time, and you knew which rows of the terminal the choices would land on, you could save each line of the terminal that has choices on them to seperate variables, and search each one, and upon finding it, you would then search for each number (1,2,3,4) on that line to see which one catches.
Additionally, you could waitfor "oranges" and capture the next 4 characters to see which number you grab, and subtract 1 from it for your orange.
Without more specific information as to what the prompts before and after may look like, it would be impossible to show you some easy example code that could complete this using any of the processes I described above.
Would you care to elaborate a little more? Maybe a cut and paste?
Brandon