• 微软原版系统

  • 一键重装系统

  • 纯净系统

  • 在线技术客服

魔法猪系统重装大师 一键在线制作启动 U 盘 PE 系统 用一键重装的魔法拯救失去灵魂的系统
当前位置:首页 > 教程 > 电脑教程

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

时间:2015年04月02日 15:39:26    来源:魔法猪系统重装大师官网    人气:18430

 /*   
* 功能:监视论坛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,"\        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,"\                    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

快手,论坛,帖子,监视,小,工具,代码,分享,功能,
栏目:电脑教程 阅读:1000 2023/12/27
Win7教程 更多>>
U盘教程 更多>>
Win10教程 更多>>
魔法猪学院 更多>>

Copyright © 2015-2023 魔法猪 魔法猪系统重装大师

本站发布的系统仅为个人学习测试使用,请在下载后24小时内删除,不得用于任何商业用途,否则后果自负,请支持购买微软正版软件。

在线客服 查看微信 返回顶部