0

我希望 i-macro 做这样的事情:

1 - 转到特定的 url,例如:http ://www.xyz.com 2 - 如果加载 url 时出错,则执行此操作

标签 POS=1 TYPE=IMG ATTR=SRC: http://www.xyz.com

3 - 否则加载页面

我的问题是我怎样才能完成这项任务

4

1 回答 1

2

由于 imacros 中没有 IF 语句,因此您需要使用 javascript(例如)。代码是这样的:

var ret=iimPlay("code:url goto=http://xyz.com");
if (ret<0){
iimPlay("code:TAG POS=1 TYPE=IMG ATTR=SRC:http://www.xyz.com");
}
else{
iimPlay("code:refresh");
}

将其保存为 js 文件并在 firefox imacros 中运行。

于 2013-02-15T07:35:25.157 回答