aardio创建多线程

admin2021-08-24  2.4K+

import win.ui;
import win.ui.menu;
import inet
/*DSG{{*/
var winform = win.form(text="线程设置";right=436;bottom=360;parent=...)
winform.add(
button9={cls="button";text="button";left=296;top=226;right=352;bottom=257;font=LOGFONT(name='宋体');z=4};
edit={cls="edit";left=19;top=229;right=264;bottom=256;edge=1;font=LOGFONT(name='宋体');z=1};
listview={cls="listview";left=5;top=22;right=414;bottom=192;bgcolor=16777215;edge=1;font=LOGFONT(name='宋体');fullRow=1;gridLines=1;z=3};
static={cls="static";text="代理ip输入格式为:
127.123.123.123:80";left=22;top=283;right=242;bottom=345;font=LOGFONT(name='宋体');transparent=1;z=2}
)
/*}}*/



fun=function(ip,hwnd){
    import inet
    import inet.http
    import win
    import win.ui.ctrl.listview;
    listview = win.ui.ctrl.listview();
    listview.hwnd = hwnd;
    inet.clearCookie()
    http=inet.http("Mozilla/4.0",ip)
    listview.setItemText("验证中",1,2);
    html=http.get("https://editor.csdn.net/md/")
    if(html){
        listview.setItemText("可用",1,2);
         listview.setItemText("可用",2,2);
    }
    else {
        listview.setItemText("不可用",1,2);
         listview.setItemText("1可用",2,2);
        
        
    }
  
    
}

fun1=function(ip,hwnd){
    import inet
    import inet.http
    import win
    import win.ui.ctrl.listview;
    listview = win.ui.ctrl.listview();
    listview.hwnd = hwnd;
    inet.clearCookie()
    http=inet.http("Mozilla/4.0",ip)
    listview.setItemText("验证中",1,2);
    html=http.get("https://editor.csdn.net/md/")
    if(html){
        listview.setItemText("可用",1,2);
         listview.setItemText("可用",2,2);
    } else {
         listview.setItemText("不可用",3,2);
         listview.setItemText("1可用",4,2);
         listview.setItemText("15可用",5,2);
         
    }
     win.msgbox("赚钱")
}

winform.button9.oncommand = function(id,event){
    
    ip = "http://" ++ winform.edit.text
    ss=thread.create(fun,ip,winform.listview.hwnd)
    dd= thread.create(fun1,ip,winform.listview.hwnd)
   
    
   
}
  




winform.listview.addItem("127.76.212.250:8080",2)
winform.listview.addItem("127.76.212.250:8080",3)
winform.listview.addItem("127.76.212.250:8080",4)
winform.listview.addItem("127.76.212.250:8080",5)
winform.listview.addItem("127.76.212.250:8080",6)
winform.listview.insertColumn("编号",200,1);
winform.listview.insertColumn("编号",200,2);

winform.show()
win.loopMessage();
return winform;
转载请注明原文地址: https://aardio.net/read-200.html
最新回复(0)
aardio问答
aardio编程语言