1. 程式人生 > >Zee的LR指令碼練習二:迴圈列印web_reg_save_param儲存的引數

Zee的LR指令碼練習二:迴圈列印web_reg_save_param儲存的引數

Action()
{
    char buffer[128] = {0};
 int j;
    int i;

  web_reg_save_param("param1",
  "LB=Content-Length: ",
  "RB=/r/n""",
  "NotFound=ERROR",
     "Ord=all",
  "Search=Headers",
  LAST);

 web_url("www.hao123.com",
  "URL=http://www.hao123.com/",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t2.inf",
  "Mode=HTML",
  LAST);

 //lr_save_string(lr_eval_string("{param1_count}"),"j");
   j=atoi(lr_eval_string("{param1_count}"));
   lr_output_message("the j is %d",j);

  for(i=1;i<=atoi(lr_eval_string("{param1_count}"));i++)
   {

   sprintf( buffer, "{param1_%d}", i);
     lr_output_message("the conut is %s.",lr_eval_string(buffer));

    }

  return 0;