title: Simple iMacros Loop and Extract
body: <p>I'm very new to the world of iMacro scripting, and as such I am having difficulty getting (what I believe to be) a very simply data scrape working.</p>
  
  <p>The site I wish to scrape consists of an index page (a table with each new row being a hyperlink to a product page), and then product pages (same format every time). I'd like the macro to do the following....</p>
  
  <ol>
  <li>Clicking first hyperlink (table row ie. <code>POS1</code>)</li>
  <li>Once page loaded, scrape 10 fields (will always be in the same place on each page)</li>
  <li>Go <code>BACK</code> (to index page)</li>
  <li>Increment down to the next hyperlink (the next table row ie. <code>POS2</code>)</li>
  <li>Extract data and repeat</li>
  <li>Export the data as a single file/csv with each set of scraped data being a new line/row</li>
  </ol>
  
  <p>This is what I have so far... (link removed because it requires a login)</p>
  
  <pre><code>VERSION BUILD=7401598
  TAB T=1
  TAB CLOSEALLOTHERS
  URL GOTO=https://XXXXXXXXXXXX
  TAG POS={{!loop}} TYPE=TD FORM=ID:form1 ATTR=TXT:*
  TAG POS=8 TYPE=TD FORM=ID:form1 ATTR=TXT:* EXTRACT=TXT
  TAG POS=6 TYPE=TD FORM=ID:form1 ATTR=TXT:* EXTRACT=TXT
  TAG POS=20 TYPE=TD FORM=ID:form1 ATTR=TXT:* EXTRACT=TXT
  TAG POS=24 TYPE=TD FORM=ID:form1 ATTR=TXT:* EXTRACT=TXT
  TAG POS=22 TYPE=TD FORM=ID:form1 ATTR=TXT:* EXTRACT=TXT
  TAG POS=34 TYPE=TD FORM=ID:form1 ATTR=TXT:* EXTRACT=TXT
  TAG POS=38 TYPE=TD FORM=ID:form1 ATTR=TXT:* EXTRACT=TXT
  TAG POS=42 TYPE=TD FORM=ID:form1 ATTR=TXT:* EXTRACT=TXT
  TAG POS=46 TYPE=TD FORM=ID:form1 ATTR=TXT:* EXTRACT=TXT
  TAG POS=66 TYPE=TD FORM=ID:form1 ATTR=CLASS:labelBold EXTRACT=TXT
  SAVEAS TYPE=EXTRACT FOLDER=C:\iMacrosExports\ FILE=Extract_{{!NOW:ddmmyy_hhnnss}}.csv
  WAIT SECONDS=2
  BACK
  </code></pre>
  
  <p>The script above is only collecting data from the first product page, and exporting it as multiple CSV's (however many times I declare it to loop).</p>
  
  <p>Any help would be GREATLY appreciated. If you require more info, please let me know.</p>