iMacros w EVAL([javascript]} FORMAT errors on attempts and no solution

    TAB T=1 
    TAB CLOSEALLOTHERS 
    CLEAR
SET !ENCRYPTION NO  
SET !EXTRACT_TEST_POPUP NO 
SET !ERRORIGNORE NO
SET !EXTRACT NULL
'
' following line has error ""Error -1100: Wrong format of SET ThisPort EVAL(...)""
SET ThisPort EVAL(" var X=(' for (i = 3016; i <= 3065; i++)  { for (j = 1; j <= 3; j++) } '); X; ")
'
'PROMPT JS.output={{ThisPort}}
SET !EXTRACT {{ThisPort}}
SAVEAS TYPE=EXTRACT FOLDER=I:IIM FILE=[JS].nested.loop_test.log

These are some of previous attempts .. tried to use JShint.com but as far as I get is FORMAT or SYNTAX errors.

No formal JS training, just usually do much better w iMacros 🙁

What I am trying to have as output is a list of numbers from 3016 to 3065, 3 times. Eventually will be in larger macro as variables for port #s. If there is better javascript format I would appreciate being enlighted.

'Error -1250: JScript statement in EVAL contains the following error: 
'Expected expression. 
'Line 12: SET ThisPort EVAL(" var X=( for (i = 3016; i <= 3065; i++)  { for (j = 1; j <= 3; j++); } X; ")
'Error -1250: JScript statement in EVAL contains the following error: 
'Variable 'i' has not been declared. 
'Line 12: SET ThisPort EVAL("  for (i = 3016; i <= 3065; i++)  { for (j = 1; j <= 3; j++); } ")
'
' Error -1250: JScript statement in EVAL contains the following error: 
'Variable 'i' has not been declared. 
'Line 12: SET ThisPort EVAL("  for(i=3016; i<=3065; i++);  { for(j=1; j<=3; j++); } ")
'
'Error -1250: JScript statement in EVAL contains the following error: 
'Expected expression. 
'Line 12: SET ThisPort EVAL(" var port=( for (i = 3016; i <= 3065; ++i)  { for (j = 1; j <= 3; ++j) } );  port; ")
'
'Error -1250: JScript statement in EVAL contains the following error: 
'Expected identifier. 
'Line 12: SET ThisPort EVAL(" var ( for (i = 3016; i <= 3065; ++i)  { for (j = 1; j <= 3; ++j) } ); ")
'
'Error -1250: JScript statement in EVAL contains the following error: 
'Syntax error. 
'Line 12: SET ThisPort EVAL("  for (i = 3016; i <= 3065; ++i)  { for (j = 1; j <= 3; ++j) }; ")
'
' Error -1250: JScript statement in EVAL contains the following error: 
'Syntax error. 
'Line 12: SET ThisPort EVAL("  for (i = 3016; i <= 3065; i++)  { for (j = 1; j <= 3; j++) }; ")
'
'Error -1250: JScript statement in EVAL contains the following error: 
'Expected expression. 
'Line 12: SET ThisPort EVAL(" X=( for (i = 3016; i <= 3065; i++)  { for (j = 1; j <= 3; j++) };) X; ")
'
'Error -1100: Wrong format of 
'SET ThisPort EVAL ("  for (i = 3016; i <= 3065; i++)  { for (j = 1; j <= 3; j++) }; ");
' command, at line: 12

The reason I am not just using a list of variables is that I have no way to use same numbers more than once. ie used the 50 port numbers multiple times in list and all I get is a STOP after the first round of 50 … gggrrr.. even restarting iMacros doesnt cure. The iMacros forum had only 1 real thread on the subject and the primary response was to use the list multiplying 🙁


Source: syntax

Leave a Reply