-
web_reg_find("Text=ABC", "SaveCount=abc_count", LAST);
web_url("Step", "URL=...", LAST);
if (strcmp(lr_eval_string("{abc_count}"), "0") == 0)
lr_output_message("not found");
else
lr_output_message("{abc_count} found");
如果想保存并且显示找到的文本,可以使用web_reg_save_param界定左右边界把找到的信息保存到参数中。如下:
-
char *str1,*str2;
str1="desired text";
// Register the left and right beacons sought:
web_reg_save_param("param","LB/ic=xxx","RB=xxx");
// Do the monitored deed:
web_url("some url","URL=www.xxx.com",LAST);
// Compare:
str2=lr_eval_string("{param}");
if(strcmp(str1,str2)==0) {
lr_output_message("param found");
}else{
lr_output_message("Value found is %s",str2);
}