西西软件园多重安全检测下载网站、值得信赖的软件下载站!
软件
软件
文章
搜索

首页编程开发其它知识 → 快手论坛帖子监视小工具 代码分享

快手论坛帖子监视小工具 代码分享

相关软件相关文章发表评论 来源:本站整理时间:2010/12/17 17:25:19字体大小:A-A+

作者:佚名点击:44次评论:0次标签: 论坛帖子 快手

PostioV2.0.0.180 绿色版
  • 类型:文本编辑大小:87KB语言:中文 评分:5.0
  • 标签:
立即下载

 /*   
* 功能:监视论坛1分钟前的帖子,不过 VIP区域无法监视
* 作者: cbtan
* 日期:2010-12-15
* 备注: 练习快手之用
*/
import win.ui;
import inet.http;
import process;
Beep = ::Kernel32.api("Beep","int(int,int)")
/*DSG{{*/
var winform = win.form(parent=...; bottom=371;topmost=1;right=340;text="帖子监视小工具" )
winform.add(
checkbox={ checked=1;bottom=337;right=171;left=22;top=318;font=LOGFONT( name="宋体";h=-12 );z=4;text="单击打开网页并删除列表";cls="checkbox" };
button={ bottom=348;right=323;left=234;top=317;font=LOGFONT( name="宋体";h=-12 );z=2;text="开始监视";cls="button" };
static={ bottom=31;color=0;right=265;left=86;top=11;font=LOGFONT( name="宋体";h=-14;out=3;family=2;clip=2;quality=1 );z=3;text="快手论坛帖子监视小工具";transparent=1;cls="static" };
listbox={
items={  };bgcolor=16777215;bottom=304;color=255;right=326;left=17;top=34;font=LOGFONT( name="宋体";h=-14;out=3;family=2;clip=2;quality=1 );z=1;text="listbox";edge=1;cls="listbox" };
checkbox2={ checked=1;bottom=356;text="开启新帖子提示音";left=23;top=339;font=LOGFONT( name="宋体";h=-12 );z=5;right=157;cls="checkbox" }
)
/*}}*/

http=inet.http()
links={}

/*
查找links键,如果没这个键
下载link匹配出标题,将标题写入links值中,link写入键中
添加进listbox中
*/
scan=function(link){
    if(not links[link]){
        bt=http.down("http://" + link)
        bt=string.match(bt,"\<title\>(.*?)\s-\s")
        links[link]=bt
        winform.listbox.add(bt,1)
        if(winform.checkbox2.checked=true){
            Beep(1500,100); //提示音
        }
    }
}

//下载匹配出1分钟前的帖子链接

开始=function(zt){
    while( win.delay(1) ){
        select(zt) {
            case "1" {
                web=http.down("http://www.aau.cn/forum.php")
                for m in string.gmatch(web,"\<a.*?\<\/span\>") {
                    if(string.match(m,"\>1\&"+"nbsp\;分钟前")){
                    win.delay(1)
                    link=string.match(m,
                    "www\.aau\.cn\/forum\-redirect\-tid\-\d+\-goto\-lastpost\.html\#lastpost")
                        if(#link){
                            scan(link)
                        }
                    }
                }
                win.delay(50*1000)//延时50秒
            }
            case "0" {
                win.delay(1)
            }   
        }
    }
}

//listbox操作
winform.listbox.wndproc = function(hwnd,message,wparam,lparam){
    select(message) {
        case 0x202{
            for(k,v in links){
                if(winform.listbox.selText==v){
                    if(winform.checkbox.checked=true){
                        process.execute(k)
                    }
                    links[k]=null
                }
            }
            winform.listbox.delete()   
        }
    }
}


//开始监视控件
winform.button.oncommand = function(id,event){
    if(winform.button.text="开始监视"){
        winform.button.text="暂停监视"
        开始("1")
    }
    else {
        winform.button.text="开始监视"
        开始("0")
    }   
}
winform.show()
win.loopMessage();
return winform;



scan(link)

直接修改成

process.execute(link)

其他的都删除,包含窗体一切不需要的东西!

快手(AAuto Quicker) V0.57 最新版下载:http://www.cr173.com/soft/5900.html

    相关评论

    阅读本文后您有什么感想? 已有人给出评价!

    • 8 喜欢喜欢
    • 3 顶
    • 1 难过难过
    • 5 囧
    • 3 围观围观
    • 2 无聊无聊

    热门评论

    最新评论

    发表评论 查看所有评论(0)

    昵称:
    表情: 高兴 可 汗 我不要 害羞 好 下下下 送花 屎 亲亲
    字数: 0/500 (您的评论需要经过审核才能显示)