I'm trying to create a macro that will click a button if a certain user's username is not shown on the page, and if that users name is on the page, to move to the next url.
I've looked at other forums about how this could be done, and the code below is the best that I've got. When I play it I get an #EANF# error, and I'm not sure what to change to make it work.
I'm also not entirely sure if the code I've got is the best way of doing want I want either, so I'm open to changing it completely if need be.
iMacros version 8.9.7
Firefox 49.0.2
OS X Yosemite 10.10.5
Code: Select all
SET URL_ID 1234
ADD URL_ID -1{{!LOOP}}
SET !EXTRACT NULL
TAG POS=1 TYPE=BODY ATTR=TXT:user EXTRACT=TXT
SET !VAR1 EVAL("var text=\"{{!EXTRACT}}\"; if(text==\"user\") text=\"jibber\"; else text=\"click me\";text;")
TAG POS=1 TYPE=BUTTON ATTR=TXT:{{!VAR1}}
WAIT SECONDS=0.5
URL GOTO=https://abcd.com/{{URL_ID}}