Quantcast
Channel: CRM Development 論壇
Viewing all articles
Browse latest Browse all 10280

Unable to set value of the property 'Inner HTML' object is null or undefined ERROR

$
0
0

I made my first visual basic programm today but i keep getting this error:

Unable to set value of the property 'Inner HTML' object is null or undefined

this is my code i know it isnt very good writing:

Public Class Smokkelen

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=smuggling&tab=firework")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("buy_goods") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("amount").SetAttribute("value", TextBox1.Text)
                WebBrowser1.Document.GetElementById("buy_goods").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("amount") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If
        Else
            Do
                Application.DoEvents()
            Loop

        End If
    End Sub

  

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=smuggling&tab=drugs")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("buy_goods") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("amount").SetAttribute("value", TextBox1.Text)
                WebBrowser1.Document.GetElementById("buy_goods").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("amount") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If
        Else

            Do
                Application.DoEvents()
            
            Loop
        End If
    End Sub

    Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

    End Sub
    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=smuggling&tab=liquids")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("buy_goods") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("amount").SetAttribute("value", TextBox1.Text)
                WebBrowser1.Document.GetElementById("sell_goods").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("amount") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If
        Else
            Do
                Application.DoEvents()
            Loop
        End If
    End Sub

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=smuggling&tab=liquids")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("buy_goods") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("amount").SetAttribute("value", TextBox1.Text)
                WebBrowser1.Document.GetElementById("buy_goods").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("amount") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If
        Else
            Do
                Application.DoEvents()
            Loop

        End If
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=smuggling&tab=weapons")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("buy_goods") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("amount").SetAttribute("value", TextBox1.Text)
                WebBrowser1.Document.GetElementById("buy_goods").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("amount") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If
        Else
            Do
                Application.DoEvents()
            Loop

        End If
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=smuggling&tab=animals")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("buy_goods") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("amount").SetAttribute("value", TextBox1.Text)
                WebBrowser1.Document.GetElementById("buy_goods").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("amount") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If
        Else
            Do
                Application.DoEvents()
            Loop

        End If
    End Sub

    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=smuggling&tab=drugs")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("buy_goods") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("amount").SetAttribute("value", TextBox1.Text)
                WebBrowser1.Document.GetElementById("sell_goods").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("amount") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If
        Else
            Do
                Application.DoEvents()
            Loop
        End If
    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=smuggling&tab=firework")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("buy_goods") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("amount").SetAttribute("value", TextBox1.Text)
                WebBrowser1.Document.GetElementById("sell_goods").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("amount") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If
        Else
            Do
                Application.DoEvents()
            Loop
        End If
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=smuggling&tab=weapons")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("buy_goods") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("amount").SetAttribute("value", TextBox1.Text)
                WebBrowser1.Document.GetElementById("sell_goods").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("amount") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If
        Else
            Do
                Application.DoEvents()
            Loop
        End If
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=smuggling&tab=animals")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("buy_goods") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("amount").SetAttribute("value", TextBox1.Text)
                WebBrowser1.Document.GetElementById("sell_goods").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("amount") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If
        Else
            Do 
                Application.DoEvents()
            Loop

        End If
    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then            
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=traveling")
        Else
            Do
                Application.DoEvents()
            Loop
        End If

    End Sub

    Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Document.GetElementById("username").SetAttribute("value", TextBox2.Text)
            WebBrowser1.Document.GetElementById("password").SetAttribute("value", TextBox3.Text)
            WebBrowser1.Document.GetElementById("submit_login").InvokeMember("click")
        Else
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
        End If
    End Sub

    Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click

    End Sub

    Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=crimes")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("do_crime") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("do_crime").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("do_crime") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If
        Else
            Do
                Application.DoEvents()
            Loop
        End If
    End Sub

    Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=stealvehicles")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("do_crime") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("do_crime").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("do_crime") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If
        Else
            Do
                Application.DoEvents()
            Loop
        End If
    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click

        If WebBrowser1.IsBusy = True Then
            Application.DoEvents()
        ElseIf WebBrowser1.IsBusy = False Then
            WebBrowser1.Navigate("http://mafiaroots.com/nav.php?p=redlightdistrict")
            Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            If WebBrowser1.Document.GetElementById("pimp_whores") IsNot Nothing Then
                WebBrowser1.Document.GetElementById("pimp_whores").InvokeMember("click")
            ElseIf WebBrowser1.Document.GetElementById("pimp_whores") Is Nothing Then
                Do
                    Application.DoEvents()
                Loop
            End If

        Else
            Do
                Application.DoEvents()
            Loop
        End If

    End Sub


Viewing all articles
Browse latest Browse all 10280

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>