最多连续两回复。10秒内不得发两贴。
Public Class Form1 Private blnSend As Boolean = False '发送检测 Private blnCheck As Boolean = False '别人检测 Private iCountSend As Integer = 0 '发送次数 Private Sub Timer1_Tick(sender As Object,e As EventArgs) Handles Timer1.Tick Webbrowser1.Navigate("http://www.myboyan.com/yule/") End Sub Private Sub Timer2_Tick(sender As Object,e As EventArgs) Handles Timer2.Tick blnSend = True Webbrowser2.Navigate("http://www.myboyan.com/yule/b825399/") Timer2.Enabled = False End Sub Private Sub Webbrowser1_DocumentCompleted(sender As Object,e As WebbrowserDocumentCompletedEventArgs) Handles Webbrowser1.DocumentCompleted If blnCheck = False Then Exit Sub Else If Not Webbrowser1.IsBusy And Webbrowser1.ReadyState = WebbrowserReadyState.Complete Then Dim Table As HtmlElement = Webbrowser1.Document.All("td_825399") Webbrowser1.Document.GetElementById("td_825399").Focus() If Table Is nothing Then Exit Sub Table = Table.NextSibling Table = Table.NextSibling Table = Table.NextSibling TextBox1.Text = Table.InnerText If InStr(TextBox1.Text,"dzweather") = 0 Then blnCheck = False Timer1.Enabled = False blnSend = True iCountSend = 0 Webbrowser2.Navigate("http://www.myboyan.com/yule/b825399/") End If End If End If End Sub Private Sub Webbrowser2_DocumentCompleted(sender As Object,e As WebbrowserDocumentCompletedEventArgs) Handles Webbrowser2.DocumentCompleted If blnSend = False Then Exit Sub Else If Not Webbrowser2.IsBusy And Webbrowser2.ReadyState = WebbrowserReadyState.Complete Then blnSend = False Webbrowser2.Document.GetElementById("go_lastpage").Focus() Webbrowser2.Document.All("textarea").InnerText = "新春快乐,马年吉祥" & Int(100 * Rnd()).ToString Webbrowser2.Document.All("Submit").InvokeMember("click") iCountSend += 1 TextBox2.Text = iCountSend If iCountSend = 1 Then Timer2.Enabled = True Else blnSend = False Timer2.Enabled = False blnCheck = True iCountSend = 0 Timer1.Enabled = True TextBox1.Text = "" End If End If End If End Sub Private Sub Button1_Click(sender As Object,e As EventArgs) Handles Button1.Click blnCheck = True Timer1.Enabled = Enabled End Sub Private Sub Form1_Load(sender As Object,e As EventArgs) Handles MyBase.Load Randomize() Webbrowser1.ScrollBarsEnabled = True Webbrowser1.ScriptErroRSSuppressed = True Webbrowser1.Navigate("http://www.myboyan.com/yule/") '为了登录 Webbrowser2.ScrollBarsEnabled = True Webbrowser2.ScriptErroRSSuppressed = True End Sub End Class
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。