Using Answer dialog within repeat
Posted: Mon Mar 17, 2008 8:46 am
I have this repeat below in my code. I am checking for a duplicate file, and notifying the user with Answer dialog and giving them the option to stop or continue. If the user selects Stop for that file (NPath), then I want to remove it from the FilePathList.
What do I use to remove that file from the FilePathList and let the repeat run its course? I use filePathList in other functions and don't want that file/path in there after user choose "stop" for it.
(I left the "if it is "Stop" then..." unfinished)
What do I use to remove that file from the FilePathList and let the repeat run its course? I use filePathList in other functions and don't want that file/path in there after user choose "stop" for it.
(I left the "if it is "Stop" then..." unfinished)
Code: Select all
repeat for each line NPath in FilePathList
set the itemDel to "/"
put last item of NPath into Tfile
if Tfile is among the lines of Dupefld then
answer error Tfile & space & "already exists" with "Stop" or "Continue"
if it is "Stop" then
end if
end repeat