dqf 发表于 2010-2-9 21:00:00

LR手动关联

是以http://nt.discuz.net/bugs/为例
在阶附件中分别提供了“录制的代码”,“录制的界面”,“录制界面的源代码”
目的是想每次去访问Bug这个模块下的置顶贴
我手动设置的关联为:
Action()
{

        web_add_cookie("visitedforums=3,8; DOMAIN=nt.discuz.net");

        web_add_cookie("lastpostedforum=3; DOMAIN=nt.discuz.net");

        web_add_cookie("dnt=userid=72409&password=ITBijh1PPQriNGy%2fucNGzu86KftCV8sFfcYu%2bNCwEk628LvLgbPuaA%3d%3d&tpp=0&ppp=0&pmsound=0&invisible=0&referer=showtopic.aspx%3ftopicid%3d80822%26page%3d1%26forumpage%3d1&sigstatus=0&expires=43200&visitedforums=3&postmessage=&oldtopic=D80822; DOMAIN=nt.discuz.net");

        web_url("nt.discuz.net",
                "URL=http://nt.discuz.net/",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/templates/default/images/icon_search.gif", ENDITEM,
                "Url=/templates/default/images/submenubg.gif", ENDITEM,
                "Url=/templates/default/images/portalbox_bg.gif", ENDITEM,
                "Url=/templates/default/images/headbg.gif", ENDITEM,
                "Url=/templates/default/images/menubg.gif", ENDITEM,
                "Url=/templates/default/images/icon_drop.gif", ENDITEM,
                "Url=/templates/default/images/navbg.gif", ENDITEM,
                "Url=/templates/default/images/icon_subnav.gif", ENDITEM,
                "Url=/templates/default/images/icon_num.gif", ENDITEM,
                "Url=/templates/default/images/icon_announcement.gif", ENDITEM,
                "Url=/templates/default/images/btn_post.gif", ENDITEM,
                "Url=/templates/default/images/forum_new.gif", ENDITEM,
                "Url=/templates/default/images/forum.gif", ENDITEM,
                "Url=/templates/default/images/forumbg.gif", ENDITEM,
                "Url=/templates/default/images/usericon.gif", ENDITEM,
                "Url=/templates/default/images/noavatar_small.gif", ENDITEM,
                "Url=/templates/default/images/space.gif", ENDITEM,
                LAST);

        lr_think_time(4);

        web_reg_save_param("topid",
                                           "LB=<a href=\"/showtopic-",
                                           "RB=.html\" target=\"_blank\"><img src=\"/templates/default/images/folder_",
                                           "Ord=1",
                                           LAST);

        web_link("BUG 反馈",
                "Text=BUG 反馈",
                "Ordinal=2",
                "Snapshot=t2.inf",
                EXTRARES,
                "Url=../templates/default/images/forumdigest.gif", ENDITEM,
                "Url=../templates/default/images/arrow_left.gif", ENDITEM,
                "Url=../templates/default/images/arrow_right.gif", ENDITEM,
                "Url=../templates/default/images/arrow_down.gif", ENDITEM,
                "Url=../templates/default/images/newarow.gif", ENDITEM,
                "Url=../templates/default/images/noavatar_medium.gif", ENDITEM,
                "Url=../templates/default/images/online.gif", ENDITEM,
                "Url=../templates/default/images/folder_s.gif", ENDITEM,
                "Url=../editor/images/editor.gif", ENDITEM,
                "Url=../ad/quickeditorad.jpg", ENDITEM,
                LAST);

        web_link("删除",
                "Text=删除",
                "Snapshot=t3.inf",
                EXTRARES,
                "Url=/templates/default/images/pmto.gif", ENDITEM,
                "Url=/templates/default/images/star_level1.gif", ENDITEM,
                "Url=/templates/default/images/album.gif", ENDITEM,
                "Url=/templates/default/images/ajaxaction.gif", ENDITEM,
                "Url=/templates/default/images/useronline.gif", ENDITEM,
                "Url=/templates/default/images/text_zoom.gif", ENDITEM,
                "Url=/templates/default/images/text_common.gif", ENDITEM,
                "Url=/templates/default/images/fastreply.gif", ENDITEM,
                "Url=/templates/default/images/repquote.gif", ENDITEM,
                "Url=/templates/default/images/edit.gif", ENDITEM,
                "Url=/templates/default/images/ad_icon.gif", ENDITEM,
                LAST);

        web_submit_data("ajax.aspx",
                "Action=http://nt.discuz.net/tools/ajax.aspx?t=getiplist",
                "Method=POST",
                "RecContentType=application/json",
                "Referer=http://nt.discuz.net/showtopic-80822.html",
                "Snapshot=t4.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=iplist", "Value=", ENDITEM,
                "Name=pidlist", "Value=", ENDITEM,
                LAST);

        return 0;
}
运行后结果报Action.c(45): Error -26377: No match found for the requested parameter "topid". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size       
Action.c(45): web_link("BUG 反馈") highest severity level was "ERROR", 134654 body bytes, 11687 header bytes       

云层 发表于 2010-2-10 09:17:27

   
web_reg_save_param(&quot;topid&quot;,
&quot;LB=&lt;a href=\&quot;/showtopic-&quot;,
&quot;RB=.html\r\n\&quot; target=\&quot;_blank\&quot;&gt;&lt;img src=&quot;,
&quot;Ord=ALL&quot;,
&quot;Search=noresource&quot;,
LAST);


web_url(&quot;bug&quot;,
&quot;URL=http://nt.discuz.net/bugs/&quot;,
&quot;Resource=0&quot;,
&quot;Referer=&quot;,
LAST);

这样关联就行了,程序员在里面写了点东西,导致关联的时候还要处理个换行符

dqf 发表于 2010-2-10 10:22:53

不行 还是不行呀

dqf 发表于 2010-2-10 10:23:48

比较愚笨 能帮忙改一下原制作的代码吗?
多谢了

云层 发表于 2010-2-10 13:42:07

额,被论坛把符号处理了。。晕死 在.html后面加个/r/n就行了

云层 发表于 2010-2-10 13:42:27

"RB=.html\r\n\" target=\"_blank\"><img src=",
页: [1]
查看完整版本: LR手动关联