Search code examples
imacros

Imacros eval firefox


Currently using Imacros and got a problem, Im using VERSION BUILD=8961227 RECORDER=FX Windows 7 Firefox 44.0.1

Im trying to make something for instagram and Id like if it says follow then it will set the wait time to 30, if it says following it will change the Variable 7 to 0, so far the program will run but it will accept the if statement no matter if it says follow or following and set the wait time to 30, it wont pass it on to the else statement, any solutions?

VERSION BUILD=8961227 RECORDER=FX
TAB T=1
FILTER TYPE=IMAGES STATUS=OFF
SET !ERRORIGNORE YES
SET !TIMEOUT_PAGE 10

URL GOTO=https://www.instagram.com/instagram/ 
TAG POS=1 TYPE=BUTTON ATTR=TXT:* EXTRACT=TXT
SET !VAR0 {{!EXTRACT}}
SET !EXTRACT NULL

SET !VAR3 Follow
SET !VAR4 Following

SET !VAR7 EVAL("if (\"{{VAR0}}\" == \"{{VAR3}}\") {VAR7= 5;} else {VAR7= 0;}; ")

wait seconds = {{!VAR7}}
TAG POS=1 TYPE=BUTTON ATTR=TXT:Follow   
wait seconds = {{!VAR7}}
PROMPT EXTRACT:<SP>_{{!EXTRACT}}_<BR>VAR0:<SP>_{{!VAR0}}_<BR><BR>VAR3:<SP>_{{!VAR3}}_<BR>VAR4:<SP>_{{!VAR4}}_<BR><BR>VAR7:<SP>_{{!VAR7}}_

Solution

  • Try this EVAL statement:

    SET !VAR7 EVAL("('{{!VAR0}}' == '{{!VAR3}}') ? 30 : 0;")