loops - Run alternate command in iMacros when TAG not found -


i have created imacros script in firefox, activates "next" link in set of pages, every once in while there sort of "would continue" page, "next" tag doesn't exist, , "would continue?" tag exists instead.

my current script this:

tag pos=1 type=a attr=txt:next 

and (pseudocode):

try {     tag pos=1 type=a attr=txt:next } catch (error -921) {     'firefox error "tag not found"     tag pos=1 type=a attr=txt:would<sp>you<sp>like<sp>to<sp>continue? } 

update: according accepted answer, final form following:

set !errorignore yes set !timeout_page 10 set !timeout_tag 0 tag pos=1 type=a attr=txt:next<sp>> tag pos=1 type=a attr=txt:continue saveas type=htm folder=* file=mensagem+{{!urlcurrent}}.htm 

some remarks:

  • !timeout_tag set zero, otherwise create waiting interval every loop, since 1 of tags fail given page;
  • !timeout_page has relatively large value, it's maximum value, since seems going page loads, , script running fast can;

try this:

set !errorignore yes tag pos=1 type=a attr=txt:next tag pos=1 type=a attr=txt:would<sp>you<sp>like<sp>to<sp>continue? 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -