[英]How to add 1 number to variable each time it loops on iMacros?
我正在使用firefox iMacros插件进行自动化。 我被困在某一点。 当我执行以下代码时,它起作用了! 但是,我想每次增加一个名为CONTENT的变量。 就像,在此脚本中,其针对帐户编号001执行。
现在,我想通过增加内容编号来循环使用此脚本。 我的意思是,第一次执行后,它将针对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”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.