title: Imacros Eval function Small Help Required
body: <p>Hello Please Help Me with this </p>
  
  <p>this is middlle snippet of the whole script ( numbering and asterisk only for reference )</p>
  
  <pre><code>1) ONDOWNLOAD FOLDER=C:\MyFiles\ FILE=captcha.jpg WAIT=YES
  2) TAG POS=1 TYPE=IMG ATTR = *******
  3) *****
  4) ****
  5) ***
  6) SET !VAR1 {{!EXTRACT}}
  7) TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:CAPTCHABox ATTR=ID:tokentext CONTENT= {{!EXTRACT}}
  8 TAG POS=1 TYPE=BUTTON ATTR=ID:continue
  </code></pre>
  
  <p>Then after step 8</p>
  
  <p>I want it to check for this element </p>
  
  <pre><code>TAG POS=1 TYPE=H1 ATTR=TXT:Check
  </code></pre>
  
  <p>if it exists then move forward to the next lines of the code ( step 9, 10 etc ) else if it does not exists or gives an error then i want it to repeat steps from 1 to 8 and then check again, if element is absent again repeat 1-8 else move forward to step 9 and so on..</p>
  
  <p>i think EVAL function can be used in it , can you please provide the correct code ? i have tried a lot of times but failed </p>
  
  <p>P.s - I am already looping whole script from .vbs if possible please provide code that can be used in .iim only </p>
  
  <p>Please Reply</p>
  
  <p>thank you very very much</p>
  
  <p>Edit - this is my .vbs code </p>
  
  <pre><code>Option Explicit
  
  Dim iim1, i, s , shell
  dim iret
  dim myname, mypath
  dim pos
  
  
  'initialize iMacros instance
  set iim1= CreateObject ("iMacros")
  
  
  
  'i = iim1.iimOpen ("-fx", false) 'Use open Firefox instance if available
  i = iim1.iimOpen ("-fx", true) 'Always open new instance
  
  pos = 2
  
  Do while pos &lt; 5
  
  
  
  iret = iim1.iimSet("loopVar",Cstr(pos))
  iret = iim1.iimPlay("ecc2.iim")
  
  
  set shell=createobject("wscript.shell")
  shell.Run "%comspec% /c C:\Users\SDFL\Desktop\dc1.bat"
  
  pos = pos + 1
  loop
  </code></pre>
  
  <p>Please tell me how i can do this without disturbing the main loop and bat file ?</p>