on error how to continue in a for-next loop

"patlaca04" <[email protected]>
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
I'm a sort of a newbie and trying to figure this out. So I thought I'd
ask. I'm using a for next loop to process spam to report spam to
spamcop using outlook and IE. The script works great except when it
can't continue for one of several reasons. 

Inside the count for/next the script reads each email link and copies
it to IE to process and then back to Outlook. In IE it tries to find
the 2 successive unique words checking a checkbox and hitting the send
button.  And then waiting while the net processes the spam, when
spamcop returns its finished report the script will continue back to
Outlook and loop again continuing the count. It will stop if
encountered something other than the usual reporting(its not an error
per se), like its too old or it can't continue with the find part of
the script(4 or 5 different scenarios could stop it)(so the script
sits there waiting for the proper window title to proceed which
doesn't happen. So I need it to continue (thus skipping this email and
processing the next in the count)when it stops like this.

I looked for simple examples to build from but couldn't find any. Any
help would be appreciated.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.