I have already written "Automated Registration" with VB to implement Mailbox (1): Form Auto Submit "and" Use VB to implement Mailbox Auto Registration (2): Modify Proxy Server "(Blog.9cbs.Net/qiyanchao, now Do a mobile network forum irrigation machine with the basic method I use, the network forum is a very popular forum, and many forums use the mobile network forum. Once, I wanted to download the main information when I browsed an English forum, but the version of pigs will set up the number of posts exceeding two hundred to download. I am very angry and decided to make a irrigation machine, and study the tag elements of the page. After that, I have developed a method of irrigation to the mobile network forum. The specific source code is as follows:
DIM HTMLTEMPTEXT AS STRING
Private submmand1_click ()
Me.webbrowser1.navigate me.text1.text
'Form1.show
'Me.webbrowser1.setfocus
End Sub
Private sub flow_load ()
'Form1.show
'Me.webbrowser1.setfocus
End Sub
Private sub webbrowser1_documentcomplete (Byval PDISP As Object, URL AS VARIANT)
ON Error ResMe next
WebBrowser1.setfocus
DIM DOC AS Object
SET DOC = WebBBROWSER1.Document
IF INSTR (Doc.Body.innertext, Text3.Text)> 0 THEN
Doc.all.Item ("fontsize"). Focus
DIM Objhtml As Object
Set objhtml = doc.body.createtextRange ()
IF not isnull (objhtml) THEN
Htmltemptext = Objhtml.htmlText
Text2.text = htmltemptext
END IF
DIM TMP AS STRING
TMP = "fasdfasdfsfd"
'Dim Aa As Long
'aa = postmessage (Me.Webbrowser1.hwnd, & H100, 9, 0)
SendKeys "{TAB}"
SendKeys TMP
'SendKeys "{TAB}"
'SendKeys "{TAB}"
'' Doc.all.Item ("Submit"). Focus
'SendKeys "{ENTER}"
Dim Str As String
Str = "ASDF"
SendKeys "^ {entry}"
END IF
IF INSTR (Doc.Body.innertext, "Fasdfasdfsfd"> 0 THEN
Doc.all.Item ("fontsize"). Focus
TMP = "fasdfasdfsfd"
'Dim Aa As Long
'aa = postmessage (Me.Webbrowser1.hwnd, & H100, 9, 0)
SendKeys "{TAB}"
SendKeys TMP
'SendKeys "{Tab}"' sendKeys "{tab}"
'' Doc.all.Item ("Submit"). Focus
'SendKeys "{ENTER}"
SendKeys "^ {entry}"
END IF
IF INSTR (Doc.Body.innertext, "Error Message"> 0 THEN
Me.webbrowser1.navigate me.text1.text
END IF
End Sub
There are many statements that have been released in the above code. When I debug, you can use the code to copy it to VB. Note that text1.text is the URL you want to irrigate. Such as:
http://bbs.wwenglish.org/dispbbs.asp?boardid=73&id=39431&page=1
Before Irrigation, you have to log in and get the right to irry. There is also a very important point to text3.text is the typical text on this post page. It is said that it is the page or half-line text, so that the program confirms the page, such as the text "Postgraduate Translation Data Series" some type of.
After the program page setting is complete, click the button to start water, huh, I want to be useful for some people.
It is also very important to pay attention to ensuring that this Irrigation program window is the current work window. If you switch to other programs, you may not be intake, so you should start the water before eating, you will turn off after eating. jobs.