循环特定行来自datasource imacro

时间:2015-11-29 18:34:13

标签: imacros

`SET !ERRORIGNORE YES
SET !DATASOURCE user.txt
SET !LOOP 1
SET !DATASOURCE_COLUMNS 4

URL GOTO=myurl
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:username CONTENT={{!COL1}}
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:form1 ATTR=ID:password CONTENT={{!COL2}}
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:form1 ATTR=ID:remember CONTENT=YES
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form1 ATTR=ID:submit


SET !ERRORIGNORE YES
SET !DATASOURCE gradu.txt
SET !LOOP 1
SET !DATASOURCE_COLUMNS 4

SET MyLoop {{!LOOP}}
ADD MyLoop {{!LOOP}}
ADD MyLoop {{!LOOP}}

ADD MyLoop -1
SET !DATASOURCE_LINE {{MyLoop}}

URL GOTO=myurl
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:sourceCodeArea ATTR=*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:formApprove ATTR=NAME:title CONTENT={{!COL1}}
TAG POS=1 TYPE=TEXTAREA FORM=ID:formApprove ATTR=NAME:description CONTENT={{!COL1}}
SET !VAR1 EVAL("var s = '{{!COL1}}'.replace(/ /g, ','); s;")
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:formApprove ATTR=NAME:tags CONTENT={{!VAR1}}

TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:formApprove ATTR=ID:approveButton2
wait seconds=25
TAG POS=1 TYPE=TEXTAREA FORM=ACTION:/sketch/*/postComment ATTR=ID:commentTextArea CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/sketch/*/postComment ATTR=NAME:Submit

ADD MyLoop 1
SET !DATASOURCE_LINE {{MyLoop}}

URL GOTO=myurl
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:sourceCodeArea ATTR=*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:formApprove ATTR=NAME:title CONTENT={{!COL1}}
TAG POS=1 TYPE=TEXTAREA FORM=ID:formApprove ATTR=NAME:description CONTENT={{!COL1}}
SET !VAR1 EVAL("var s = '{{!COL1}}'.replace(/ /g, ','); s;")
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:formApprove ATTR=NAME:tags CONTENT={{!VAR1}}

TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:formApprove ATTR=ID:approveButton2
wait seconds=25
TAG POS=1 TYPE=TEXTAREA FORM=ACTION:/sketch/*/postComment ATTR=ID:commentTextArea CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/sketch/*/postComment ATTR=NAME:Submit`

我正在尝试使用datasource user.txt登录网站,并从datasource gradu.txt发布前三行。之后我想使用datasource user.txt登录下一个用户并希望发布接下来的三行数据源毕业.txt.But我的代码无法正常工作。它如何工作。我的代码就是。

0 个答案:

没有答案