每次在 iMacros 上循环时如何向变量添加 1 个数字?
How to add 1 number to variable each time it loops on iMacros?
我正在使用 firefox iMacros 插件进行自动化。我一度被困住了。当我执行以下代码时,它起作用了!但是,我想每次增加一个名为 CONTENT 的变量。就像,在这个脚本中,它是为帐户号 001 执行的。
现在,我想循环使用此脚本并增加 CONTENT 编号。我的意思是,在第一次执行后,它将执行 CONTENT no- 002,然后执行 003 和很快。我应该对该脚本做哪些更改才能使其正常工作?
VERSION BUILD=10022823
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://www.example.com
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:logInBankForm ATTR=NAME:userID CONTENT=myID
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:logInBankForm ATTR=NAME:password CONTENT=myPassword
TAG POS=1 TYPE=IMG FORM=NAME:logInBankForm ATTR=SRC:http://example.com/pages/login.jpg
TAG POS=1 TYPE=IMG FORM=NAME:logInBankForm ATTR=ID:join103
TAG POS=1 TYPE=A FORM=NAME:logInBankForm ATTR=TXT:Transaction<SP>Profile
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:accountNo CONTENT=001
DS CMD=KEY X=0 Y=0 CONTENT={ENTER}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[0].totalTransactionPerDay CONTENT=5
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[0].totalAmountPerDay CONTENT=300000
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[0].totalTransactionPerMonth CONTENT=20
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[0].totalAmountPerMonth CONTENT=1000000
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[0].maxAmountPerTransaction CONTENT=200000
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[1].totalTransactionPerDay CONTENT=4
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[1].totalAmountPerDay CONTENT=300000
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[1].totalTransactionPerMonth CONTENT=15
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[1].totalAmountPerMonth CONTENT=1000000
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[1].maxAmountPerTransaction CONTENT=200000
TAG POS=1 TYPE=FONT FORM=NAME:customerTransactionProfileForm ATTR=TXT:Execute
如果需要更通用的解决方案,您可以尝试更改这两行
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:accountNo CONTENT=001
DS CMD=KEY X=0 Y=0 CONTENT={ENTER}
为
SET !LOOP 1
SET accNo EVAL("('00' + {{!LOOP}}).slice(-3);")
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:accountNo CONTENT={{accNo}}
SET !ERRORIGNORE YES
DS CMD=KEY X=0 Y=0 CONTENT={ENTER}
EVENT TYPE=KEYPRESS SELECTOR=* KEY=13
WAIT SECONDS=6
SET !TIMEOUT_STEP 0
旧信息。
替换行
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:accountNo CONTENT=001
和
SET !LOOP 1
SET accNo EVAL("('00' + {{!LOOP}}).slice(-3);")
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:accountNo CONTENT={{accNo}}
并以循环模式播放整个宏。
顺便说一句,您提供的代码仅适用于 'iMacros Browser',但不适用于 Firefox 的 'iMacros'。
我正在使用 firefox iMacros 插件进行自动化。我一度被困住了。当我执行以下代码时,它起作用了!但是,我想每次增加一个名为 CONTENT 的变量。就像,在这个脚本中,它是为帐户号 001 执行的。
现在,我想循环使用此脚本并增加 CONTENT 编号。我的意思是,在第一次执行后,它将执行 CONTENT no- 002,然后执行 003 和很快。我应该对该脚本做哪些更改才能使其正常工作?
VERSION BUILD=10022823
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://www.example.com
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:logInBankForm ATTR=NAME:userID CONTENT=myID
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:logInBankForm ATTR=NAME:password CONTENT=myPassword
TAG POS=1 TYPE=IMG FORM=NAME:logInBankForm ATTR=SRC:http://example.com/pages/login.jpg
TAG POS=1 TYPE=IMG FORM=NAME:logInBankForm ATTR=ID:join103
TAG POS=1 TYPE=A FORM=NAME:logInBankForm ATTR=TXT:Transaction<SP>Profile
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:accountNo CONTENT=001
DS CMD=KEY X=0 Y=0 CONTENT={ENTER}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[0].totalTransactionPerDay CONTENT=5
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[0].totalAmountPerDay CONTENT=300000
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[0].totalTransactionPerMonth CONTENT=20
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[0].totalAmountPerMonth CONTENT=1000000
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[0].maxAmountPerTransaction CONTENT=200000
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[1].totalTransactionPerDay CONTENT=4
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[1].totalAmountPerDay CONTENT=300000
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[1].totalTransactionPerMonth CONTENT=15
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[1].totalAmountPerMonth CONTENT=1000000
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:indexProfileList[1].maxAmountPerTransaction CONTENT=200000
TAG POS=1 TYPE=FONT FORM=NAME:customerTransactionProfileForm ATTR=TXT:Execute
如果需要更通用的解决方案,您可以尝试更改这两行
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:accountNo CONTENT=001
DS CMD=KEY X=0 Y=0 CONTENT={ENTER}
为
SET !LOOP 1
SET accNo EVAL("('00' + {{!LOOP}}).slice(-3);")
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:accountNo CONTENT={{accNo}}
SET !ERRORIGNORE YES
DS CMD=KEY X=0 Y=0 CONTENT={ENTER}
EVENT TYPE=KEYPRESS SELECTOR=* KEY=13
WAIT SECONDS=6
SET !TIMEOUT_STEP 0
旧信息。
替换行
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:accountNo CONTENT=001
和
SET !LOOP 1
SET accNo EVAL("('00' + {{!LOOP}}).slice(-3);")
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:customerTransactionProfileForm ATTR=NAME:accountNo CONTENT={{accNo}}
并以循环模式播放整个宏。
顺便说一句,您提供的代码仅适用于 'iMacros Browser',但不适用于 Firefox 的 'iMacros'。