ken19850 发表于 2012-8-2 15:00:47

脚本语句求教

本帖最后由 ken19850 于 2012-8-2 15:03 编辑

Action()
{
        int i=1,j;
        char str,value;                web_submit_data("goods_in_stock.aspx",
                "Action=http://vip.dqc100.com/Manager/Seller/goods_in_stock.aspx",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=text/html",
                "Referer=http://vip.dqc100.com/Manager/Seller/goods_in_stock.aspx",
                "Snapshot=t3.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=__EVENTTARGET", "Value=", ENDITEM,
                "Name=__EVENTARGUMENT", "Value=", ENDITEM,
                "Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState3}", ENDITEM,
                "Name=__EVENTVALIDATION", "Value={Siebel_Analytic_ViewState4}", ENDITEM,
                "Name=ctl00$Header1$HeaderTop1$J_Code", "Value=请输入您要搜索的产品", ENDITEM,
                "Name=ctl00$Header1$HeaderTop1$Hf_hfType", "Value=0", ENDITEM,
                "Name=ctl00$ContentPlaceMain$txt_ComTitle", "Value=", ENDITEM,
                "Name=Sec_SubmitBtn", "Value=搜索", ENDITEM,
                //"Name=ctl00$ContentPlaceMain$rptList$ctl00$ChkItem", "Value=on", ENDITEM,
                j=atoi(lr_eval_string("Siebel_Analytic_ViewState5_count");
                lr_error_message("%d",j);
                if(i<=j)
                {
                        sprintf(str,"{Siebel_Analytic_ViewState5_%d}",i);
                        lr_save_string(lr_eval_string(str),"value");
                        "Name=ctl00$ContentPlaceMain$rptList$ctl00$hfItem", "Value={value}", ENDITEM, ;
                        i++;
                }
                /*
                "Name=ctl00$ContentPlaceMain$rptList$ctl00$hfItem", "Value=37902", ENDITEM,
                "Name=ctl00$ContentPlaceMain$rptList$ctl01$hfItem", "Value=37901", ENDITEM,
                "Name=ctl00$ContentPlaceMain$rptList$ctl02$hfItem", "Value=37900", ENDITEM,
                "Name=ctl00$ContentPlaceMain$rptList$ctl03$hfItem", "Value=37899", ENDITEM,
                "Name=ctl00$ContentPlaceMain$rptList$ctl04$hfItem", "Value=37898", ENDITEM,
                "Name=ctl00$ContentPlaceMain$rptList$ctl05$hfItem", "Value=37897", ENDITEM,
                "Name=ctl00$ContentPlaceMain$rptList$ctl06$hfItem", "Value=37895", ENDITEM,
                "Name=ctl00$ContentPlaceMain$rptList$ctl07$hfItem", "Value=37894", ENDITEM,
                "Name=ctl00$ContentPlaceMain$rptList$ctl08$hfItem", "Value=37893", ENDITEM,
                "Name=ctl00$ContentPlaceMain$rptList$ctl09$hfItem", "Value=37857", ENDITEM,
                */
                "Name=operate", "Value=", ENDITEM,
                "Name=ctl00$ContentPlaceMain$btnUpShelf1", "Value=上 架", ENDITEM,
                LAST);
PS:Siebel_Analytic_ViewState5是个关联,ord=all,取的是循环部分那部分数值!
我想写个循环在web_submit_data里面,但是一直提示语法出错,求教!哪里需要修改或者哪里出错了!新人,勿喷!

mystic 发表于 2012-8-3 09:47:03

傻孩子,循环只能写在web_submit_data外面!

yubiao584521 发表于 2012-8-3 11:28:42

云层 发表于 2012-8-3 12:13:23

请在关联请求后写处理,而不能在函数中写C语言

ken19850 发表于 2012-8-3 17:09:52

呵呵,新手,且半路出家身份!谢谢各位的热心回答!小弟又学到了点东西!
页: [1]
查看完整版本: 脚本语句求教