Search code examples
imacros

IMACROS - Infinit Loop


How do I get an infinite loop with this part of the code

TAG POS=1 TYPE=A ATTR=TXT:next
WAIT SECONDS=5

the complete code:

VERSION BUILD=844 RECORDER=CR
URL GOTO=http://localhost/site/
TAG POS=1 TYPE=A ATTR=TXT:next
WAIT SECONDS=5
TAG POS=1 TYPE=A ATTR=TXT:next
WAIT SECONDS=5

Solution

  • Just play the following macro in loop mode:

    SET myUrl http://localhost/site/
    SET curUrl EVAL("({{!LOOP}} == 1) ? '{{myUrl}}' : 'javascript: undefined';")
    URL GOTO={{curUrl}}
    TAG POS=1 TYPE=A ATTR=TXT:next
    WAIT SECONDS=5
    

    If you want the loop to be "infinite" set the 'Max:' value to a very big number (e.g. 99999999999).