1 Action() 2 { 3 char *p=NULL; 4 web_reg_find("Fail=NotFound", 5 "Search=All", 6 "SaveCount=baidu_count", 7 "Text=head", 8 LAST); 9 10 web_url("web_url", 11 "URL=https://www.baidu.com/", 12 "TargetFrame=", 13 "Resource=0", 14 "Referer=", 15 "RecContentType=text/html", 16 "Snapshot=t1.inf", 17 "Mode=HTML", 18 LAST); 19 20 p=lr_eval_string("{baidu_count}"); 21 switch (*p) 22 { 23 case ‘1‘: 24 lr_output_message("找到1个字符串");break; 25 case ‘2‘: 26 lr_output_message("找到2个字符串");break; 27 default: 28 lr_output_message("字符串数量大于2或未找到字符串"); 29 lr_output_message(lr_eval_string("{baidu_count}")); 30 break; 31 } 32 33 return 0; 34 }
原文:http://www.cnblogs.com/jxdong116/p/7231390.html