Thank you everyone for your suggestions.
I stuggled with this most of last night and ended up with a method that is most similar to what Darius, Ron and Darkie describe.
I have a list of notecards which I've created elsewhere that are ones that have the same name as what another object (the installer) proposes to send. The aim is to allow the user to first delete the existing one or to keep it and have the new one iinstalled with a numerical suffix.
I decided to avoid doing anything that involves state changes since I would lose listens that I count on being there later.
At the end of the function that creates my list of duplcate notecards, I call PocessDupNCList() which looks something like this:
ProcessDupNCList()
{
if (dupNCList != [])
{
AlertABoutDialog(); // tells the user in chat to attend to the dialog
currentDupNC = llList2String(dupNCList,0);
dupNCList = llDeleteSubList(dupNCList,0,0);
llDialog(owner,"The installer wants to install a notecard named " + currentDupNC + " but one by that name is already in the object. What should we do with the notecard in the object? (Clicking on Ignore will abort the installation.)",["Delete it","Keep it"],INSTALLCHANNEL);
}
else
{
currentDupNC = "";
FinalReview();
}
}
then in my listen event I have code that looks like this:
...
if (message == "Delete it")
{
delNCList = delNCList + currentDupNC;
ProcessDupNCList();
}
else if (message == "Keep it")
{
keepNCList = keepNCList + currentDupNC;
ProcessDupNCList();
}
So, it only goes on to the next item in the list if one of those two buttons is pressed.
To deal with the Ignore, I set up a timer. When it times out, I just reset everything.
Hitting ignore effectively aborts the process and prevents the code from going to the final review and installation. If the user were to restart this process, all the variables would be reset to their orighinal values.