theMagicNumber
Regular Member
- May 13, 2010
- 347
- 197
DONT'T you see it is a C# not VB, i told you to translate it to VB(i am not doing this for you).
Private Sub ElectricButton2_Click(sender As Object, e As EventArgs) Handles ElectricButton2.Click WebBrowser1.Navigate("https://www.blurum.it/Web/")
Dim searchBox As HtmlElement = Nothing
Dim searchButton As HtmlElement = Nothing
searchBox = WebBrowser1.Document.GetElementsByTagName("input").OfType(Of HtmlElement)().FirstOrDefault(Function(p) p.GetAttribute("classname") = "search_bar_input")
searchButton = WebBrowser1.Document.GetElementsByTagName("input").OfType(Of HtmlElement)().FirstOrDefault(Function(p) p.GetAttribute("classname") = "search")
Do While WebBrowser1.Document Is Nothing OrElse searchBox Is Nothing OrElse searchButton Is Nothing
Application.DoEvents()
searchBox = WebBrowser1.Document.GetElementsByTagName("input").OfType(Of HtmlElement)().FirstOrDefault(Function(p) p.GetAttribute("classname") = "search_bar_input")
searchButton = WebBrowser1.Document.GetElementsByTagName("input").OfType(Of HtmlElement)().FirstOrDefault(Function(p) p.GetAttribute("classname") = "search")
Loop
Dim keyword As String = ListBox1.SelectedItem
WebBrowser1.Document.GetElementsByTagName("input").OfType(Of HtmlElement)().FirstOrDefault(Function(p) p.GetAttribute("classname") = "search_bar_input").InnerText = (keyword)
searchBox.SetAttribute("value", keyword)
searchButton.InvokeMember("click")
WebBrowser1.Refresh()
For i As Integer = ListBox1.SelectedItems.Count - 1 To 0 Step -1
Dim k As Integer = ListBox1.SelectedIndices(i)
ListBox1.Items.RemoveAt(k)
Next
Timer1.Enabled = True
End Sub
No offense, but you are one of the laziest people i have ever seen.
3 days since you posted the thread - you could solve the problem on your own instead of relying on others.
I took some of my time to write the shitty code you are using and not a single thanks ? I know where the problem is, but guess what, i can be a douche too. Have a nice day.