没有循环的iMacros上的自动递增变量

Auto-incrementing variable on iMacros without loop

这是我当前需要帮助的 iMacro 代码:

`VERSION BUILD=8961227 RECORDER=FX
SET !LOOP 1
SET !var1 
add !var1 {{!loop}}
TAB T=1
URL GOTO=https://www.google.com/?gws_rd=ssl
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:tsf ATTR=ID:lst-ib CONTENT={{!var1}}`

此代码在循环模式下运行良好,但我想在每次手动执行时自动递增 var1

测试1: TAG POS=1 TYPE=INPUT:TEXT FORM=ID:tsf ATTR=ID:lst-ib CONTENT=1

测试 2:TAG POS=1 TYPE=INPUT:TEXT FORM=ID:tsf ATTR=ID:lst-ib CONTENT=2

希望能说清楚,谢谢帮助

你可以试试EVAL:

SET !VAR1 1
TAB T=1
URL GOTO=https://www.google.com/?gws_rd=ssl
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:tsf ATTR=ID:lst-ib CONTENT={{!VAR1}}
SET !VAR1 EVAL("var s=\"{{!VAR1}}\"; parseInt(s)+1;")
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:tsf ATTR=ID:lst-ib CONTENT={{!VAR1}}
VERSION BUILD=8961227 RECORDER=FX
SET !DATASOURCE NUM.csv
SET !VAR1 {{!COL1}}
TAB T=1
URL GOTO=https://www.google.com/?gws_rd=ssl
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:tsf ATTR=ID:lst-ib CONTENT={{!VAR1}}
**FILEDELETE NAME=C:\Users\Th3\Documents\iMacros\Datasources\NUM.CSV** 
ADD !VAR1 1
SET !EXTRACT {{!VAR1}}
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Th3\Documents\iMacros\Datasources FILE=NUM.CSV