title: How to make a macro file recognize TABs of first macro file js variable?
body: <p>I am a beginner, trying to pass a imacros variable into JavaScript, but it failed. I run FF 55.0.3 on Win 7 32 bit, imacros ver. v8.9.7</p>
  
  <p>I have 2 iim scripts that I call from JS, the first one runs only once.</p>
  
  <p>The first one do some tasks on 2 URLs on 2 TABS, back and forth, when it finishes its task, js call the the second iim file, the second iim file should work on those opened 2 TABs as well,</p>
  
  <p>But second macro script does not remember the TAB 1, to go back and do some work. </p>
  
  <p>When first macro finishes its task, ends on TAB T=1, so the second macro starts to work on TAB 1, and it goes to TAB 2 even though TAB 2 was first opened from first macro file.</p>
  
  <p>But when it should go back to TAB 1, it won't, so the first macro file do not carry tabs memory to second macro, and I have no idea how to do so.</p>
  
  <p>(no new TAB on second macro file).</p>
  
  <p>I have tried this in the second macro file:</p>
  
  <pre><code>SET MyTB 1
  TAB T={{MyTB}}
  </code></pre>
  
  <p>and in JS file</p>
  
  <pre><code> iimPlay("MyMacro-1");
  var retcode;
  retcode = iimPlay("MyMacro-1")
  
  SET !MyTB
  PROMPT {{!MyTB}}
  
  if (retcode &gt; 0) {
  retcode = iimPlay("MyMacro-2")
  }
  iimDisplay (retcode);
  for (var i=0;i&lt;=9;i++) {
  iimPlay("MyMacro-2");
  }
  </code></pre>
  
  <p>but I get error on line with this code: <code>SET !MyTB</code>.</p>
  
  <p>I am not sure this is the right approach in JS to make it work, but I have to try it.</p>