|
看我执行的:
脚本:
Action()
{
int j;
int i;
int h;
web_reg_find("Text=音乐MP3",
"Search=body",
"SaveCount=param1",
LAST);
web_reg_find("Text=百度搜索",
"Search=body",
"SaveCount=param2_Count",
LAST);
web_reg_find("Text=中华英才网",
"Search=body",
"SaveCount=param3_count",
LAST);
web_url("www.hao123.com",
"URL=http://www.hao123.com/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=/line.gif", ENDITEM,
"URL=/images/dl.gif", ENDITEM,
"URL=/images/dc.gif", ENDITEM,
"URL=/images/dh.gif", ENDITEM,
"URL=/images/df.gif", ENDITEM,
"URL=/images/db.gif", ENDITEM,
"URL=/images/guangg/ebay.gif", ENDITEM,
LAST);
j=atoi(lr_eval_string("{param1_count}"));
lr_output_message("the j is %d",j);
i=atoi(lr_eval_string("{param2_Count}"));
lr_output_message("the i is %d",i);
h=atoi(lr_eval_string("{param3_count}"));
lr_output_message("the h is %d",h);
if (atoi(lr_eval_string("{param1_count}")) > 0 )
lr_output_message("音乐MP3");
else
lr_output_message("无音乐MP3");
if (atoi(lr_eval_string("{param2_Count}")) > 0)
lr_output_message("百度搜索");
else
lr_output_message("无百度搜索");
if (atoi(lr_eval_string("{param3_count}")) > 0)
lr_output_message("中华英才网");
else
lr_output_message("无中华英才网");
return 0;
}
结果:
Starting iteration 1.
Starting action Action.
Action.c(7): Registering web_reg_find was successful [MsgId: MMSG-26390]
Action.c(11): Registering web_reg_find was successful [MsgId: MMSG-26390]
Action.c(15): Registering web_reg_find was successful [MsgId: MMSG-26390]
Action.c(20): Downloading resource "http://www.hao123.com/line.gif" (specified by argument number 10) [MsgId: MMSG-26577]
Action.c(20): Downloading resource "http://www.hao123.com/images/dl.gif" (specified by argument number 12) [MsgId: MMSG-26577]
Action.c(20): Downloading resource "http://www.hao123.com/images/dc.gif" (specified by argument number 14) [MsgId: MMSG-26577]
Action.c(20): Downloading resource "http://www.hao123.com/images/dh.gif" (specified by argument number 16) [MsgId: MMSG-26577]
Action.c(20): Downloading resource "http://www.hao123.com/images/df.gif" (specified by argument number 18) [MsgId: MMSG-26577]
Action.c(20): Downloading resource "http://www.hao123.com/images/db.gif" (specified by argument number 20) [MsgId: MMSG-26577]
Action.c(20): Downloading resource "http://www.hao123.com/images/guangg/ebay.gif" (specified by argument number 22) [MsgId: MMSG-26577]
Action.c(20): Found resource "http://www.hao123.com/logo.gif" in HTML "http://www.hao123.com/" [MsgId: MMSG-26659]
Action.c(20): Found resource "http://www.hao123.com/images/guangg/xiangmu2.gif" in HTML "http://www.hao123.com/" [MsgId: MMSG-26659]
Action.c(20): Found resource "http://www.hao123.com/images/guangg/xiangmu.gif" in HTML "http://www.hao123.com/" [MsgId: MMSG-26659]
Action.c(20): Found resource "http://www.hao123.com/logox2.gif" in HTML "http://www.hao123.com/" [MsgId: MMSG-26659]
Action.c(20): Found resource "http://www.hao123.com/biaoshi.gif" in HTML "http://www.hao123.com/" [MsgId: MMSG-26659]
Action.c(20): Found resource "http://www.hao123.com/js/sendmail.js" in HTML "http://www.hao123.com/" [MsgId: MMSG-26659]
Action.c(20): Registered web_reg_find successful for "Text=音乐MP3" (count=1) [MsgId: MMSG-26364]
Action.c(20): Registered web_reg_find successful for "Text=百度搜索" (count=1) [MsgId: MMSG-26364]
Action.c(20): Registered web_reg_find successful for "Text=中华英才网" (count=2) [MsgId: MMSG-26364]
Action.c(20): web_url("www.hao123.com") was successful, 35337 body bytes, 4745 header bytes [MsgId: MMSG-26386]
Action.c(41): the j is 0
Action.c(44): the i is 1
Action.c(47): the h is 2
Action.c(52): 无音乐MP3
Action.c(55): 百度搜索
Action.c(60): 中华英才网
Ending action Action.
Ending iteration 1. |
|