Valhalla Legends Forums Archive | Visual Basic Programming | HTML GetStuff?

AuthorMessageTime
titan0060
Ok, the GetStuff command basicaly searches a text file, but is there any way i can have it search an INTERNET PAGE?  the page is like plain HTML, no flash or anything.
October 17, 2004, 1:45 AM
Quarantine
You mean display the HTML? If you mean using a .html file for config.....wtf?
October 17, 2004, 2:09 AM
titan0060
i mean search my webbrowser (which is already on the site i want in frmBrowser) and look for a sertain string like "Yo"... Then display like in a msgbox,  what the next thing that comes after the word "Yo"...

Basicaly if i could convert the webbrowser into a string, i can just use the splt() command... but how do u convert it to a string.
October 17, 2004, 2:16 AM
Newby
The "GetStuff" function, if you are using the common one found in most open-source Visual Basic bots, utilizes API calls that don't access the internet.

You would have to re-code it using some sort of internet control, that would connect to the file, input its contents, and search through that.
October 17, 2004, 2:18 AM
titan0060
i never expected to use the exact getstuff code... i just want sumthing to search my WebBrowser1 for a sertain word...
October 17, 2004, 2:34 AM
______
[quote author=titan0060 link=topic=9186.msg84776#msg84776 date=1097980468]
i never expected to use the exact getstuff code... i just want sumthing to search my WebBrowser1 for a sertain word...
[/quote]

You mean something like this?
[code]
If InStr(WebBrowserText, myword) = 0 Then
MsgBox "Not found."
Else
MsgBox "Found!"
End If
[/code]
October 17, 2004, 5:06 AM
CrAz3D
Look @ the webpage's source through the webbrowser control.  YAY, that is how I got my lovely gmail acct.
October 17, 2004, 5:53 AM
Newby
[quote author=CrAz3D link=topic=9186.msg84797#msg84797 date=1097992387]
Look @ the webpage's source through the webbrowser control.  YAY, that is how I got my lovely gmail acct.
[/quote]
Idea stealer!
October 17, 2004, 5:55 AM
LivedKrad
What about GMail??
October 17, 2004, 5:30 PM
titan0060
[quote author=CrAz3D link=topic=9186.msg84797#msg84797 date=1097992387]
Look @ the webpage's source through the webbrowser control.  YAY, that is how I got my lovely gmail acct.
[/quote]

how do i get my program to open the page source...
October 17, 2004, 9:04 PM
CrAz3D
[quote author=titan0060 link=topic=9186.msg84873#msg84873 date=1098047097]
[quote author=CrAz3D link=topic=9186.msg84797#msg84797 date=1097992387]
Look @ the webpage's source through the webbrowser control.  YAY, that is how I got my lovely gmail acct.
[/quote]

how do i get my program to open the page source...
[/quote]
Don't remember, check pscode. (it pwns my mom)
October 17, 2004, 11:34 PM
Dyndrilliac
Use OpenURL on the inet control and give the value to a string variable.
October 17, 2004, 11:42 PM
Imperceptus
How I do it
Your Inet Control  = MyInetControl

*note untested code

[code]
Private Sub Form_Load()
MyInetControl.execute("http://yoni.valhallalegends.com")

End Sub


Private Sub MyInetControl_StateChanged(ByVal State As Integer)
    Dim vtData As Variant
    Dim StrData As String
    Dim bDone As Boolean: bDone = False

With MyInetControl
    Select Case State     
        Case icError        ' 11  ' In case of error, return ResponseCode and
                                            ' ResponseInfo.
          vtData = .ResponseCode & ":" & .ResponseInfo
          vtData = .ResponseCode & ":" & .ResponseInfo
          itProcessCount = itProcessCount - 1
      Case icResponseCompleted    ' 12 good Retrieve server response
                                                        '  using the GetChunk
            vtData = .GetChunk(1024, icString) ' Get first chunk.
            Do While Not bDone
              StrData = StrData & vtData
              vtData = .GetChunk(331000, icString) ' Get next chunk.
              DoEvents
              If Len(vtData) = 0 Then bDone = True
            Loop
         
        Case Else
    End Select
End Sub

[/code]

Hope this provides some ideas, not you might want to change the GetChunk Sizes around I just mashed some numbers on the numpad.  Execute is hands down way faster then OpenUrl.
October 21, 2004, 1:34 AM
YaYYo
[quote author=Imperceptus link=topic=9186.msg85458#msg85458 date=1098322479]
How I do it
Your Inet Control  = MyInetControl

*note untested code

[code]
Private Sub Form_Load()
MyInetControl.execute("http://yoni.valhallalegends.com")

End Sub
[/quote]

Shouldnt it be My.InetControl.Execute("http://yoni.valhallalegends.com")

?[/code]
October 24, 2004, 9:27 AM
Dyndrilliac
No, MyInetControl is the controls name.
October 24, 2004, 3:04 PM

Search