我想在imacros
中的while循环中执行while循环,但我对如何执行它有点迷失。
基本上,while循环将有一个向上和向下计数的值。我还在底部附上了一个代码,更好地解释了我想要它做什么。
VERSION BUILD=1002 RECORDER=CR
SET !TIMEOUT_STEP 2
URL GOTO=LINK_TO_SITE
EVENT TYPE=KEYPRESS SELECTOR=* KEY=35
WAIT SECONDS=2
EVENT TYPE=KEYPRESS SELECTOR=* KEY=35
WAIT SECONDS=2
' Do a while loop within a while loop where COUNT_DOWN is the outer loop (and counts down by 1 from 11), and COUNT_UP is the inner loop (and counts up by 1 from 0). If COUNT_UP is equal to 30, then it does a WAIT for 60 seconds.
TAG POS=COUNT_DOWN TYPE=A ATTR=TXT:*<SP>Open<SP>
TAG POS=COUNT_UP TYPE=BUTTON ATTR=TXT:Make
WAIT SECONDS=60
下面的解释是继承javascript
中的while循环,但我的问题是如何在imacros
中实现:
int i = 11;
while (i > 0) {
TAG POS=i TYPE=A ATTR=TXT:*<SP>Open<SP>
// ^ i value
int j = 1;
while (j <= 31) {
TAG POS=j TYPE=BUTTON ATTR=TXT:Make
// ^ j value
if (j == 30) {
WAIT SECONDS=60
}
j++;
}
i--;
}