title: IF Statements and Conditions for iMacros Firefox
body: <p>So I'm trying to make a macro to catch Pokemon from maps in this game but there if you encounter a Turf War it will show this image:</p>
  
  <p><a href="https://i.stack.imgur.com/mhr4m.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mhr4m.jpg" alt="http://i.imgur.com/W6Tjd8l.jpg"></a></p>
  
  <p>As you can see the click button says "Lets Battle!" and it redirects you to a battle link. </p>
  
  <p>However, I want to make an <code>if</code> statement that if I encounter this battle link I would refresh the page instead and let me go here.</p>
  
  <p>Does anybody know how to code <code>if</code> statements for this?</p>
  
  <p>So here's how I want it to work:</p>
  
  <pre><code>if (it encounters the Turf Battle)
     will click another link
  else
     keep clicking the map to catch using the click x and y
  </code></pre>
  
  <p>EDIT: I tried this syntax:</p>
  
  <pre><code>if (TAG POS=1 TYPE=H2 ATTR=TXT:You&lt;SP&gt;Don't&lt;SP&gt;Belong&lt;SP&gt;Here!)
  { 
      REFRESH
  }
  </code></pre>
  
  <p>but it won't work. Any help maybe?
  Giving me this error:</p>
  
  <pre><code>SyntaxError: unknown command: IF, line: 1 (Error code: -910)
  </code></pre>