How to write imacro to scroll to bottom
<p>I'm trying to create a macro that just scrolls down to the bottom of the page on a typical "endless" page such as Facebook.  Then I will Set the Max Loop and click "Play (Loop)" based on how long I want it to go.<br>
IMacro 9.0.3 in Firefox 49.0.1. </p>

<pre><code>'SET !WAITPAGECOMPLETE YES
URL GOTO=javascript:window.scrollBy(0,20)
WAIT SECONDS=1
</code></pre>

<p>It runs for maybe 20 seconds, then gets error: </p>

<blockquote>
  <p>Page loading timeout, URL: javascript:window.scrollBy(0,2000), line: 3
  (Error code: -802)</p>
</blockquote>

<p>If I include the !WAITPAGECOMPLETE, I get this error: </p>

<blockquote>
  <p>Unsupported variable !WAITPAGECOMPLETE, line: 1 (Error code: -911)</p>
</blockquote>

<p>Alternatively I tried the timeout based on this <a href="https://stackoverflow.com/questions/25626005/imacros-wait-until-page-loads">Stackoverflow Question</a>. </p>

<pre><code>'SET !WAITPAGECOMPLETE YES
SET !TIMEOUT_PAGE 3
URL GOTO=javascript:window.scrollBy(0,2000)
WAIT SECONDS=1
</code></pre>

<p>and it often gets this error (even when I just click the "Play" vs the "Play (loop)" button. </p>

<blockquote>
  <p>Page loading timeout, URL: javascript:window.scrollBy(0,2000), line: 3
  (Error code: -802)</p>
</blockquote>