Loops IMACROS搜索特定用户

Loops IMACROS搜索特定用户,loops,search,if-statement,extract,imacros,Loops,Search,If Statement,Extract,Imacros,我尝试使用宏从以下格式的链接中搜索特定用户: 所以我的代码是: VERSION BUILD=8881205 RECORDER=FX 'No popup upon extractino SET !EXTRACT_TEST_POPUP NO 'Ignoring the error coming up because the username I'm searching for won't exist on all pages SET !ERRORIGNORE YES 'Set the user-i

我尝试使用宏从以下格式的链接中搜索特定用户:

所以我的代码是:

VERSION BUILD=8881205 RECORDER=FX
'No popup upon extractino
SET !EXTRACT_TEST_POPUP NO
'Ignoring the error coming up because the username I'm searching for won't exist on all pages
SET !ERRORIGNORE YES
'Set the user-id variable initiated at 0 and incremented by 1
set !VAR1 0
add !VAR1 {{!loop}}
'Increments the userID on the webpage
URL GOTO=http://website.com/user/{{!VAR1}}
'Check if the Username on the page is the same as the one i'm looking for :
SEARCH SOURCE=TXT:"Desired-username"
'Make a txt where there is supposed to be "desired-username"+userid
TAG POS=1 TYPE=DIV ATTR=TXT:* EXTRACT=TXT
ADD !EXTRACT {{!EXTRACT}}
ADD !EXTRACT {{!VAR1}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=test.csv
因此,使用这段代码,预期结果将是一个csv,其中所有列都为空+UserID,(关键字未找到错误),直到他到达实际存在所需用户名的页面,然后在csv中的UserID附近输入所需用户名

但它不起作用,我测试了它,我不知道我错过了什么。
如果有人有更好的方法来做这件事(我很肯定你会这样做,因为我的代码非常糟糕),请分享。谢谢您的帮助。

评论您的行集!ERRORIGNORE YES

注释您的行
设置!ERRORIGNORE YES
并查看发生了哪些错误。(例如,搜索命令在源代码中找不到文本时抛出错误。我不知道它的作用。)@Shugar为了循环搜索所需的用户名,我需要使用搜索功能,如果您搜索网页中尚未存在的内容,它将崩溃,错误为“xxxx未找到”,因此我不希望停止脚本,而是希望它增加页面,然后搜索下一个页面,依此类推,直到它实际找到用户名..设置
SET!ERRORIGNORE YES
如果找到搜索的文本或未找到,宏执行是否有任何差异?