iMacros w EVAL([javascript]} FORMAT尝试失败,没有解决方案

时间:2015-05-25 16:19:08

标签: javascript syntax format imacros

我需要在连续的基础上生成特定范围内的端口#,而不是代理地址的长端口#s。其他一切都很好,除了我写的JS ......

     TAB T=1 
    TAB CLOSEALLOTHERS 
    CLEAR
SET !ERRORIGNORE NO
SET !EXTRACT_TEST_POPUP NO 
SET !EXTRACT NULL
SET ThisPort EVAL("var X = .........  X;")
PROMPT {{ThisPort}}
PAUSE
PROXY ADDRESS= 178.62.222.222:{{ThisPort}}

这些是以前的一些尝试..试图使用JShint.com但我得到的是FORMAT或SYNTAX错误。

没有正式的JS培训,通常做得更好w iMacros :(

'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++); } ")

我不只是使用变量列表的原因是我无法多次使用相同的数字。即在列表中多次使用50个端口号码,我得到的是第一轮50后的停止... gggrrr ..甚至重新启动iMacros也无法治愈。 iMacros论坛上只有一个关于这个主题的真正主题,主要的反应是使用列表乘法:(

1 个答案:

答案 0 :(得分:0)

这可能有所帮助:

...
SET ThisPort EVAL("var X = ''; for (j = 1; j <= 3; j++) {for (i = 3016; i <= 3065; i++) X += ((X == '') ? '' : '[EXTRACT]') + i;} X;")
'PROMPT {{ThisPort}}
SET !EXTRACT {{ThisPort}}
...