Reading Text

Posts 1–8 of 8 · Page 1 of 1
Reading Text
Alright well I'm trying to navigate to a webpage and read text from it. I know how to get button ids and use those but I don't know how to read text from the site. How would I go about doing that?
I don't understand what you're trying to do but i think i do. If a webpage loads too slow it shows up as text. Just refresh the page and it shows the site as normal
Quote Originally Posted by ForrestGump View Post
I don't understand what you're trying to do but i think i do. If a webpage loads too slow it shows up as text. Just refresh the page and it shows the site as normal
If he had that sort of problem, don't you think it would be in a different section? And even if he did have that problem, don't you think he would have been smart enough to REFRESH before posting..? T_T
What the hell are you talking about? I want to read text off a webpage. I want to get specific text at a specific place on a webpage like getting a button's ID and reading it. I want to get text ID and read it.
Get the innerHTML property of the area you want, or use RegEx.
Multiple ways of doing it.

Get a page source:

[php]
Private Function GetSource(ByVal myURL as string) As String
Using wc As New Net.WebClient
return wc.DownloadString(myURL)
End Using
End Function
[/php]

Or create a webbrowser control to interact with the HTML document (so you can do things such as "GetElementsByTagName" etc etc)

OR httpwebreq

[php]
Private Function GetPageSource(ByVal URL As String) as string
Dim webReq As Net.HttpWebRequest = DirectCast(Net.Webrequest.Create(URL), net.httpwebrequest)
Dim webResp As Net.HttpWebResponse = DirectCast(webReq.GetResponse, net.httpwebresponse)
Using sRead As New IO.StreamReader(webResp.GetResponseStream)
Return sRead.ReadToEnd
End Using
End Function
End Using
[/php]

Options are there.
WebBrowser1.Document.GetElementById("ID").SetAttri bute("value", "textbox1.text")

should work
Trevor- text doesn't have an ID like a button does.
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?