自动将下一个值(+1)添加到iGacro的TAG POS =(数字)?

时间:2017-05-23 16:55:46

标签: imacros

我正在创建一个iMacro来更新wordpress帖子。我有以下内容:

    URL GOTO=https://www.example.com
    TAG POS=1 TYPE=A ATTR=TXT:Edit
    WAIT SECONDS=2
    TAG POS=1 TYPE=A ATTR=TXT:Map
    WAIT SECONDS=2
    TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
    WAIT SECONDS=2
    TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
    WAIT SECONDS=4
    TAG POS=2 TYPE=A ATTR=TXT:Previous
    WAIT SECONDS=2

我遇到的问题是我需要更新400多页/帖子。

代码:         TAG POS = NUM​​BER TYPE = A ATTR = TXT:编辑

告诉哪个帖子要更新,所以我知道我必须使POS = 2,POS = 3,POS = 4等等一直到400但我需要一个更好的方法,而不是复制粘贴和手动编辑每一行。

有没有办法让代码说TAG POS = N + 1或其他东西使它成为下一个数字,直到达到400?

这是1-10的例子

URL GOTO=https://www.example.com
TAG POS=1 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2

TAG POS=2 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2

TAG POS=3 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2

TAG POS=4 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2

TAG POS=5 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2

TAG POS=6 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2

TAG POS=7 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2

TAG POS=8 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2

TAG POS=9 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2

TAG POS=10 TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2

要达到400,还有更好的方法吗? :(

1 个答案:

答案 0 :(得分:1)

我将翻译Shugar对代码的回答:

URL GOTO=https://www.example.com
TAG POS={{!LOOP}} TYPE=A ATTR=TXT:Edit
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Map
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:post ATTR=TXT:Find<SP>Check
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:post ATTR=ID:publish
WAIT SECONDS=4
TAG POS=2 TYPE=A ATTR=TXT:Previous
WAIT SECONDS=2

我们所做的就是在第2行将位置更改为{{!LOOP}},如果您将其运行为&#34;播放(循环)&#34;如果max = 400,它将解决您的问题。如果有什么东西坏了而且你想从pos开始X可以说200你可以设置!LOOP从那个数字开始