Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27121

VS 2010 Problem with HTTPWebRequest VS2010 Ultimate

$
0
0
Hello,

I'm new at this forum, I signed up because I have a question :D

I'm creating a program that automatically login to a game, and selects the server, but after I logged in, I don't know how to close and restart the code...
So I login, and then there popups a server selection... I work with get ID... But If I add it to the source, it wanna clicks directly and it doesn't wait so I get an error...

Here is the code:

Code:

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

        If didWeNavigated = False Then                                                                      'If we could not connect to darkorbit due no internet connection/darkorbit website is down, it will stop.
            Exit Sub
        End If
        If didWeNavigated = True Then didWeNavigated = False
        Dim username As String = TextBox1.Text                                                              'It will make it be able for the bot to fill in the username with the right values
        Dim password As String = TextBox2.Text                                                              'It will make it be able for the bot to fill in the password with the right values
        WebBrowser1.Document.GetElementById("loginForm_default_username").SetAttribute("Value", username)  'This will search for the Username box, and paste the username information into that text field.
        WebBrowser1.Document.GetElementById("loginForm_default_password").SetAttribute("Value", password)  'This will search for the Password box, and paste the password information into that text field.
        WebBrowser1.Document.GetElementById("loginForm_default_loginButton").Focus()                        'This one will Focus (search) on the page for the login button...
        WebBrowser1.Document.GetElementById("loginForm_default_loginButton").InvokeMember("click")          'This one will click the login button, when it has been found.
        Dim htmlel As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
        Dim el1 As HtmlElement
    End Sub


Viewing all articles
Browse latest Browse all 27121

Trending Articles



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