首页 > 代码库 > AJJL_Automatic posting

AJJL_Automatic posting

1.0

/*Call Plugin.Web.Bind("WQM.exe")   Call Plugin.Web.Go("http://www.xiazaizhijia.com/soft/63400.html")   price = Plugin.Web.HtmlGet("text", "tag:H1")price = Replace(price, " ", "_") Call Plugin.Web.Tips(price)Call Plugin.Web.LeftClick(250,189)   Call Plugin.Web.SendString(price)Delay 500Call Plugin.Web.HtmlClick("tag:P&txt:进入下载列表&index:6")  //url = Plugin.Web.GetUrl()//Delay 2000//Call Plugin.Web.TabClose()//MessageBox url  *//*Event Form1.Button1.Click    //设定一个结束参考变量    path1 = "C:\Users\Administrator\Desktop\223.txt"        fileHandle = Plugin.File.OpenFile(path)      fileline1 = Plugin.File.ReadLine(fileHandle)    path = "C:\Users\Administrator\Desktop\123.txt"        fileHandle = Plugin.File.OpenFile(path)      fileline = Plugin.File.ReadLine(fileHandle)    MessageBox "读取" & path & "文件一行长度内容是:" & fileline    fileline = Plugin.File.ReadLine(fileHandle)    Call Plugin.File.CloseFile(fileHandle)           MessageBox "读取" & path & "文件一行长度内容是:" & fileline        temp = "#"        If strComp(fileline, temp) Then             Msgbox "条件判断符合被通过!!"      End If          Call Plugin.Web.Bind("WQM.exe")       Call Plugin.Web.Go(fileline)    End Event*///获取输入内容Dim temptemp = 1 //默认发一贴 //用来限制发帖数Event Form1.InputBox1.LostFocus      temp = Form1.InputBox1.Text    temp = CInt(temp)End Event  //定义每隔多少秒发一次Dim secondEvent Form1.OptionBox2.Click    second = 5000End EventEvent Form1.OptionBox3.Click    second = 10000End EventEvent Form1.OptionBox4.Click    second = 15000End EventEvent Form1.OptionBox5.Click    second = 20000End EventDim replyreply = 3 //默认每三篇回复一贴Dim temp_replytemp_relay = 0//用来记录回复Dim number_replynumber_reply = 1//用来记录要回复多少次贴//多少贴回复一次Event Form1.InputBox2.LostFocus    reply = Form1.InputBox2.Text    reply = CInt(reply)End Event//一次回复多少贴Event Form1.InputBox3.LostFocus    number_reply = Form1.InputBox3.Text    number_reply = CInt(number_reply)End Event/**/Event Form1.Button1.Click    //准备工作, 打开论坛发帖页, 并做好结束文件准备    Dim tempp    tempp = 0        Call Plugin.Web.Bind("WQM.exe")       Call Plugin.Web.Go("http://anquan.baidu.com/bbs/forum.php?mod=post&action=newthread&fid=51")    /*    path = "C:\Users\Administrator\Desktop\223.txt"        fileHandle1 = Plugin.File.OpenFile(path)      fileline1 = Plugin.File.ReadLine(fileHandle1)    Call Plugin.File.CloseFile(fileHandle1)    */        //回复内容模块    content1 = "谢谢分享! 非常有用!"    content2 = "支持一下, 不错的分享!"    content3 = "找了好久的啊, 终于找到了, 谢谢哈~"        If Form1.CheckBox3.Value = 1 Then     content1 = Form1.InputBox4.Text    content2 = Form1.InputBox5.Text    content3 = Form1.InputBox6.Text    End If        //开始任务    path = "E:\百度安全\分享达人\a资源分享自动发帖程序\帖子链接.txt"    fileHandle = Plugin.File.OpenFile(path)        path2 = "E:\百度安全\分享达人\a资源分享自动发帖程序\回复链接.txt"    fileHandle2 = Plugin.File.OpenFile(path2)        Dim sendP    sendP = 1//用来记录要发哪条回复    sendP = CInt(sendP)        Do While true        //主要内容                    fileline = Plugin.File.ReadLine(fileHandle)                Call Plugin.Web.TabNew()        Call Plugin.Web.TabGoto(2)        Delay 500        Call Plugin.Web.Go(fileline)                //复制粘贴标题        price = Plugin.Web.HtmlGet("text", "tag:H1")        price = Replace(price, " ", "_")        Call Plugin.Web.TabGoto(1)                //点击分类        Delay 100        Call Plugin.Web.HtmlClick("id:typeid_ctrl")        Delay 100        Call Plugin.Web.HtmlClick("tag:LI&value:0&index:3")                //输入标题        Call Plugin.Web.MoveTo(318, 179)        Delay 10        Call Plugin.Web.LeftClick(318, 179)        Call Plugin.Web.SendString(price)                /**/        //获取图片链接        Call Plugin.Web.TabGoto(2)        Delay 500        iehwnd=Plugin.Web.GetHwnd()           Call Plugin.Bkgnd.RightClick(iehwnd, 252, 571)        Call Plugin.Web.KeyPress(67)                //粘贴图片        Call Plugin.Web.TabGoto(1)        Delay 200        Call Plugin.Web.LeftClick(414, 366)        iehwnd = Plugin.Web.GetHwnd()        Call Plugin.Bkgnd.RightClick(iehwnd, 414, 366)        Call Plugin.Web.KeyPress(80)                        //获取简介内容        Call Plugin.Web.TabGoto(2)        Delay 200        Call Plugin.Web.HtmlClick("id:moreIntroBtn2")        price = Plugin.Web.HtmlGet("text", "id:softIntroWrap")        Delay 50        price = Replace(price, " ", "★")                //粘贴内容        Call Plugin.Web.TabGoto(1)        Delay 200        Call Plugin.Web.LeftClick(926, 553)        Delay 200        KeyPress 13,3 //回车        Call Plugin.Web.SendString(price)                //获取下载链接        Call Plugin.Web.TabGoto(2)        Delay 1000        Call Plugin.Web.ScrollTo(0, 100)        Call Plugin.Web.LeftClick(452, 570)        Delay 500        //iehwnd=Plugin.Web.GetHwnd()           //Call Plugin.Bkgnd.LeftClick(iehwnd, 244, 132)        MoveTo 244, 289        RightClick 1        KeyPress "R", 1        MoveTo 109, 228        LeftClick 3        RightClick 1        KeyPress "C", 1        MoveTo 175, 511        Delay 100        LeftClick 1        Delay 200        Call Plugin.Web.TabClose()        //Call Plugin.Web.KeyPress(82)                        /*粘贴链接*/        Call Plugin.Web.TabGoto(1)        Delay 200        KeyPress 13, 2//回车                //添加免责声明        If Form1.CheckBox2.Value = http://www.mamicode.com/1 Then                Call Plugin.Web.SendString("————————————————————————————————————————")            KeyPress 13, 1            Call Plugin.Web.SendString("免责声明:")            KeyPress 13, 1            Call Plugin.Web.SendString("1、本资源源自互联网,请勿在未经本资源版权所有者书面授权的情况下用于商业用途。")            KeyPress 13, 1            Call Plugin.Web.SendString("2、本人对此资源只是想与论坛用户分享,无其他目的,如要转载请说明出处。")            KeyPress 13, 1             Call Plugin.Web.SendString("3、如果您是本资源的创作者,且不愿被网友分享发布,请联系论坛管理人员以便及时处理!")            KeyPress 13, 1            Call Plugin.Web.SendString("————————————————————————————————————————")            End If                KeyPress 13, 1//回车        Call Plugin.Web.SendString("下载地址: ")        KeyPress 13, 1        Call Plugin.Web.HtmlClick("id:e_hide")        Delay 200        Call Plugin.Web.HtmlClick("id:e_hide_param_1")        Delay 200        KeyDown "ctrl", 1        KeyPress "V", 1        KeyUp "ctrl", 1        Delay 100        Call Plugin.Web.HtmlClick("id:e_hide_submit")        Delay 100                //放大字体        KeyDown "ctrl", 1        KeyPress "A", 1        KeyUp "ctrl", 1        Call Plugin.Web.HtmlClick("id:e_fontsize")        Call Plugin.Web.HtmlClick("tag:A&txt:3")                //发表帖子        Call Plugin.Web.HtmlClick("id:postsubmit")                /*        iehwnd = Plugin.Web.GetHwnd()        Call Plugin.Web.LeftClick(814, 329)        Call Plugin.Bkgnd.RightClick(iehwnd, 814, 329)        Delay 200        Call Plugin.Web.KeyPress(80)        Delay 500        //Call Plugin.Web.LeftClick(789, 512)        Call Plugin.Web.HtmlClick("id:moreIntroBtn2")        */        tempp = tempp + 1        //        If tempp = temp Then                Call Plugin.File.CloseFile(fileHandle)               Exit Do        End If                Delay second         Call Plugin.Web.Go("http://anquan.baidu.com/bbs/thread-166806-1-1.html")        Delay 2000        Call Plugin.Web.LeftClick(230, 287)        Delay 1000                temp_reply = temp_reply + 1                If temp_reply = reply Then             //控制回复次数            For i = 1 To number_reply                Delay 19000                fileline2 = Plugin.File.ReadLine(fileHandle2)                Call Plugin.Web.TabNew()                Delay 500                Call Plugin.Web.TabGoto(2)                Call Plugin.Web.Go(fileline2)                Delay 200                //回复内容                 If sendP = 1 Then                     Call Plugin.Web.HtmlInput(content1, "id:fastpostmessage")                    sendP = 2                    Else If sendP = 2 Then                         Call Plugin.Web.HtmlInput(content2, "id:fastpostmessage")                        sendP = 3                        Else If sendP = 3 Then                             Call Plugin.Web.HtmlInput(content3, "id:fastpostmessage")                            sendP = 1                        End If                     End If                End If                        //确认提交                Call Plugin.Web.HtmlClick("id:fastpostsubmit")                  Delay 2000                Call Plugin.Web.TabClose()            Next            temp_reply = 0        End If                Call Plugin.Web.ClearTemp() //清理临时文件            Loop        Call Plugin.File.CloseFile(fileHandle2) //关闭文件            Delay 10000    //是否自动关机设置    If Form1.CheckBox1.Value = http://www.mamicode.com/1 Then         Call Plugin.Web.TabClose()        Delay 30000 // 30秒后关机        Call Plugin.Sys.ExitOS(1)    End If    End Event/*Event Form1.PictureBox1.Click    Form1.PictureBox1.Picture = "Attachment:\hlwyfeng.bmp" End Event*/
View Code

1.1

/*Call Plugin.Web.Bind("WQM.exe")   Call Plugin.Web.Go("http://www.xiazaizhijia.com/soft/63400.html")   price = Plugin.Web.HtmlGet("text", "tag:H1")price = Replace(price, " ", "_") Call Plugin.Web.Tips(price)Call Plugin.Web.LeftClick(250,189)   Call Plugin.Web.SendString(price)Delay 500Call Plugin.Web.HtmlClick("tag:P&txt:进入下载列表&index:6")  //url = Plugin.Web.GetUrl()//Delay 2000//Call Plugin.Web.TabClose()//MessageBox url  *//*Event Form1.Button1.Click    //设定一个结束参考变量    path1 = "C:\Users\Administrator\Desktop\223.txt"        fileHandle = Plugin.File.OpenFile(path)      fileline1 = Plugin.File.ReadLine(fileHandle)    path = "C:\Users\Administrator\Desktop\123.txt"        fileHandle = Plugin.File.OpenFile(path)      fileline = Plugin.File.ReadLine(fileHandle)    MessageBox "读取" & path & "文件一行长度内容是:" & fileline    fileline = Plugin.File.ReadLine(fileHandle)    Call Plugin.File.CloseFile(fileHandle)           MessageBox "读取" & path & "文件一行长度内容是:" & fileline        temp = "#"        If strComp(fileline, temp) Then             Msgbox "条件判断符合被通过!!"      End If          Call Plugin.Web.Bind("WQM.exe")       Call Plugin.Web.Go(fileline)    End Event*//**/Event Form1.Button1.Click    //准备工作, 打开论坛发帖页, 并做好结束文件准备    Call Plugin.Web.Bind("WQM.exe")       Call Plugin.Web.Go("http://anquan.baidu.com/bbs/forum.php?mod=post&action=newthread&fid=51")    path = "C:\Users\Administrator\Desktop\223.txt"        fileHandle1 = Plugin.File.OpenFile(path)      fileline1 = Plugin.File.ReadLine(fileHandle1)    Call Plugin.File.CloseFile(fileHandle1)        //开始任务    path = "C:\Users\Administrator\Desktop\123.txt"    fileHandle = Plugin.File.OpenFile(path)      Do While true        //主要内容                    fileline = Plugin.File.ReadLine(fileHandle)                Call Plugin.Web.TabNew()        Delay 500        Call Plugin.Web.Go(fileline)                //复制粘贴标题        price = Plugin.Web.HtmlGet("text", "tag:H1")        price = Replace(price, " ", "_")        Call Plugin.Web.TabGoto(1)                //点击分类        Call Plugin.Web.HtmlClick("id:typeid_ctrl")        Call Plugin.Web.HtmlClick("tag:LI&value:0&index:3")                //输入标题        Call Plugin.Web.MoveTo(318,179)        Call Plugin.Web.LeftClick(318, 179)        Call Plugin.Web.SendString(price)                /**/        //获取图片链接        Call Plugin.Web.TabGoto(2)        Delay 500        iehwnd=Plugin.Web.GetHwnd()           Call Plugin.Bkgnd.RightClick(iehwnd, 252, 571)        Call Plugin.Web.KeyPress(67)                //粘贴图片        Call Plugin.Web.TabGoto(1)        Delay 200        Call Plugin.Web.LeftClick(414, 366)        iehwnd = Plugin.Web.GetHwnd()        Call Plugin.Bkgnd.RightClick(iehwnd, 414, 366)        Call Plugin.Web.KeyPress(80)                        //获取简介内容        Call Plugin.Web.TabGoto(2)        Delay 200        Call Plugin.Web.HtmlClick("id:moreIntroBtn2")        price = Plugin.Web.HtmlGet("text", "id:softIntroWrap")        price = Replace(price, " ", "★")                //粘贴内容        Call Plugin.Web.TabGoto(1)        Delay 200        Call Plugin.Web.LeftClick(926, 553)        KeyPress 13,3 //回车        Call Plugin.Web.SendString(price)                //获取下载链接        Call Plugin.Web.TabGoto(2)        Delay 200        Call Plugin.Web.ScrollTo(0, 100)        Call Plugin.Web.LeftClick(452, 570)        Delay 500        //iehwnd=Plugin.Web.GetHwnd()           //Call Plugin.Bkgnd.LeftClick(iehwnd, 244, 132)        MoveTo 244, 289        RightClick 1        KeyPress "R", 1        MoveTo 109, 228        LeftClick 3        RightClick 1        KeyPress "C", 1        MoveTo 175, 511        Delay 100        LeftClick 1        //Call Plugin.Web.KeyPress(82)                        /*粘贴链接*/        Call Plugin.Web.TabGoto(1)        Delay 200        KeyPress 13, 2//回车        Call Plugin.Web.HtmlClick("id:e_hide")        Delay 200        Call Plugin.Web.HtmlClick("id:e_hide_param_1")        Delay 200        KeyDown "ctrl", 1        KeyPress "V", 1        KeyUp "ctrl", 1        Delay 100        Call Plugin.Web.HtmlClick("id:e_hide_submit")                //放大字体        KeyDown "ctrl", 1        KeyPress "A", 1        KeyUp "ctrl", 1        Call Plugin.Web.HtmlClick("id:e_fontsize")        Call Plugin.Web.HtmlClick("tag:A&txt:3")                //发表帖子        Call Plugin.Web.HtmlClick("id:postsubmit")                /*        iehwnd = Plugin.Web.GetHwnd()        Call Plugin.Web.LeftClick(814, 329)        Call Plugin.Bkgnd.RightClick(iehwnd, 814, 329)        Delay 200        Call Plugin.Web.KeyPress(80)        Delay 500        //Call Plugin.Web.LeftClick(789, 512)        Call Plugin.Web.HtmlClick("id:moreIntroBtn2")        */                //        If strComp(fileline, fileline1) = 0 Then                Call Plugin.File.CloseFile(fileHandle)               Msgbox "完成任务!"               Exit Do        End If                Delay 2000        Call Plugin.Web.LeftClick(227, 288)        Call Plugin.Web.TabGoto(2)        Delay 500        Call Plugin.Web.TabClose()                         LoopEnd EventEvent Form1.Button2.Click    EndScriptEnd EventEvent Form1.Button3.Click    ExitScriptEnd EventEvent Form1.Hotkey1.Hotkey    EndScriptEnd Event
View Code


 

小实验:

Dim tempEvent Form1.InputBox1.LostFocus       temp = Form1.InputBox1.Text    temp = CInt(temp)    MessageBox tempEnd Event  Event Form1.Button1.Click    Call Plugin.Web.Bind("WQM.exe")       Call Plugin.Web.Go("http://anquan.baidu.com/bbs/forum.php?mod=post&action=newthread&fid=51")        path = "C:\Users\Administrator\Desktop\223.txt"        fileHandle1 = Plugin.File.OpenFile(path)      fileline1 = Plugin.File.ReadLine(fileHandle1)    Call Plugin.File.CloseFile(fileHandle1)        path = "C:\Users\Administrator\Desktop\123.txt"    fileHandle = Plugin.File.OpenFile(path)          Dim tempp    tempp = 0    Do While true           fileline = Plugin.File.ReadLine(fileHandle)           tempp = tempp + 1           Call Plugin.Web.TabNew()        Call Plugin.Web.Go(fileline)        Delay 5000        If tempp = temp Then              Call Plugin.File.CloseFile(fileHandle)            MessageBox "完成!"            Exit Do        Else             MessageBox "!"        End If            Loop  End EventEvent Form1.Button2.Click    Dim temppp    temppp = 3    If temppp = temp Then         MessageBox "OK"    End If     End Event
View Code

 

AJJL_Automatic posting