Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Browsergames > DarkOrbit
You last visited: Today at 02:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Darkorbit - Vb 2010 - Login

Discussion on Darkorbit - Vb 2010 - Login within the DarkOrbit forum part of the Browsergames category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2015
Posts: 13
Received Thanks: 1
Lightbulb Darkorbit - Vb 2010 - Login

Hi guys.
At first sorry for my english.
I want to share my login code for Darkorbit in Visual Studio 2010.
You will need:
2x - TextBox
1x - Button
1x - WebBrowser

When form load it navigate webbrowser to darkorbit. -
Quote:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://www.darkorbit.com")
End Sub
This ll login you to darkorbit bot when you write username and password into TextBoxes.
Quote:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Document.GetElementById("bgcdw_login_f orm_username").SetAttribute("Value", TextBox1.Text)
WebBrowser1.Document.GetElementById("bgcdw_login_f orm_password").SetAttribute("Value", TextBox2.Text)

Dim allelements As HtmlElementCollection = WebBrowser1.Document.All

For Each webpageelement As HtmlElement In allelements

If webpageelement.GetAttribute("value") = "Login" Then

webpageelement.InvokeMember("click")

End If

Next
End Sub
IF YOU WANT ANY UPGRADES OR BETTER THINGS LIKE SKYLAB, AUCTION, ETC JUST TELL ME:-)
ramicek43 is offline  
Thanks
1 User
Old 02/18/2017, 23:13   #2
 
jorg*'s Avatar
 
elite*gold: 0
Join Date: May 2011
Posts: 1,764
Received Thanks: 1,577
This shouldnt be here but in the coding section.
Correct me if im wrong...
jorg* is offline  
Old 02/18/2017, 23:20   #3
 
elite*gold: 0
Join Date: Jul 2015
Posts: 13
Received Thanks: 1
Ye you are right. i missed :-D

Im actually new so.
ramicek43 is offline  
Old 02/19/2017, 01:01   #4
 
Freshek's Avatar
 
elite*gold: 0
Join Date: Aug 2015
Posts: 803
Received Thanks: 1,359
Thanks for sharing, but why do you use **** webbrowser? Use WebRequests.
Freshek is offline  
Old 02/19/2017, 02:41   #5

 
~Demetrio~'s Avatar
 
elite*gold: 93
Join Date: Oct 2012
Posts: 1,234
Received Thanks: 1,116
Quote:
Originally Posted by ramicek43 View Post
Hi guys.
At first sorry for my english.
I want to:
Sharing too!

~Demetrio~ is offline  
Thanks
1 User
Old 02/19/2017, 12:08   #6
 
Freshek's Avatar
 
elite*gold: 0
Join Date: Aug 2015
Posts: 803
Received Thanks: 1,359
Quote:
Originally Posted by ~Demetrio~ View Post
Sharing too!

Code:
if (url.StartsWith("http"))
        {
            return "wrong";
        }
Why not just throw an exception after login error? Or put an event like OnLoginFailure. Also I think Regex would be better solution in find_str_from_to2.

Edit:
why do you use this.? It's not Java.

Code:
if (url.Equals("/indexInternal.es?action=internalStart"))
Use == operator.

Please improve your code using by tips.
Freshek is offline  
Thanks
1 User
Old 02/19/2017, 12:20   #7
 
elite*gold: 0
Join Date: Jul 2015
Posts: 13
Received Thanks: 1
Nver used WebRequest
i Thought that is more easy for begginers.
ramicek43 is offline  
Old 02/19/2017, 17:45   #8

 
~Demetrio~'s Avatar
 
elite*gold: 93
Join Date: Oct 2012
Posts: 1,234
Received Thanks: 1,116
Quote:
Originally Posted by Freshek View Post
Code:
if (url.StartsWith("http"))
        {
            return "wrong";
        }
Why not just throw an exception after login error? Or put an event like OnLoginFailure. Also I think Regex would be better solution in find_str_from_to2.

Edit:
why do you use this.? It's not Java.

Code:
if (url.Equals("/indexInternal.es?action=internalStart"))
Use == operator.

Please improve your code using by tips.

HAHAHAHA always Criticizing another jobs!

since is not my code i don't care , it's reflector. i just wanted to help to him.
~Demetrio~ is offline  
Thanks
1 User
Old 02/19/2017, 18:11   #9
 
manulaiko3.0's Avatar
 
elite*gold: 0
Join Date: May 2014
Posts: 663
Received Thanks: 1,154
Quote:
Originally Posted by Freshek View Post
Code:
if (url.StartsWith("http"))
        {
            return "wrong";
        }
Why not just throw an exception after login error? Or put an event like OnLoginFailure. Also I think Regex would be better solution in find_str_from_to2.

Edit:
why do you use this.? It's not Java.

Code:
if (url.Equals("/indexInternal.es?action=internalStart"))
Use == operator.

Please improve your code using by tips.
Why you talking **** about other's code? It's as easy as ignoring the thread when you see in the name vb 2010
manulaiko3.0 is offline  
Thanks
2 Users
Old 02/19/2017, 18:37   #10
 
elite*gold: 0
Join Date: Nov 2015
Posts: 157
Received Thanks: 61
Code:
Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://www.darkorbit.com/")
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Try
            WebBrowser1.Document.GetElementById("bgcdw_login_form_username").SetAttribute("value", textbox1.Text)
            WebBrowser1.Document.GetElementById("bgcdw_login_form_password").SetAttribute("value", textbox2.Text)
            For Each p As HtmlElement In WebBrowser1.Document.GetElementsByTagName("input")
                If p.GetAttribute("type") = "submit" Then
                    p.InvokeMember("click")


                End If
            Next
        Catch ex As Exception
            MsgBox("Error: " & ex.Message, MsgBoxStyle.Critical)
        End Try
    End Sub
End Class
orys is offline  
Old 02/19/2017, 19:10   #11
 
Freshek's Avatar
 
elite*gold: 0
Join Date: Aug 2015
Posts: 803
Received Thanks: 1,359
Quote:
Originally Posted by manulaiko3.0 View Post
Why you talking **** about other's code? It's as easy as ignoring the thread when you see in the name vb 2010
Someone might just use this code in his project. I just gave him few tips how can he improve it. What's bad in it?
Freshek is offline  
Old 02/20/2017, 00:00   #12
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
Quote:
Originally Posted by jorg* View Post
This shouldnt be here but in the coding section.
Correct me if im wrong...
This thread should not exist in any ssection

Quote:
Originally Posted by Freshek View Post
Why not just throw an exception after login error? Or put an event like OnLoginFailure. Also I think Regex would be better solution in find_str_from_to2.

Edit:
why do you use this.? It's not Java.

Code:
if (url.Equals("/indexInternal.es?action=internalStart"))
Use == operator.

Please improve your code using by tips.
I feel the abuse of event's here.

Also this url.Equals might be some weird compiler optimisation or just his crappy decompiler.

There are valid use cases to not use the == operator

Quote:
Originally Posted by ramicek43 View Post
SNIP
I also want to share some knowledge with you

Visual Basic is the programming language.
Visual Studio is the "IDE".
2010 is the edition of this "IDE".

It's not VB 2010. It is Visual Basic code produced in Visual Studio 2010 and probably you are compiling with the Visual Basic .Net 3.5 compiler

Quote:
Originally Posted by Freshek View Post
Someone might just use this code in his project. I just gave him few tips how can he improve it. What's bad in it?
No one should ever use ANY code provided in this thread
YatoDev is offline  
Old 02/20/2017, 18:18   #13
 
elite*gold: 0
Join Date: Jul 2015
Posts: 13
Received Thanks: 1
Whats going on here..
i just tried to help begginers in VB
It is the most simple way i think so.
ramicek43 is offline  
Old 02/20/2017, 19:27   #14
 
manulaiko3.0's Avatar
 
elite*gold: 0
Join Date: May 2014
Posts: 663
Received Thanks: 1,154
Quote:
Originally Posted by ramicek43 View Post
Whats going on here..
i just tried to help begginers in VB
It is the most simple way i think so.
You did nothing wrong, is just that there are people that whatever you do, they will try to find a flaw on it and tell you a better way.
When coding it's more obvious, not only in this section, but everywhere. Have you ever seen someone talk **** about a programming language? Generally Java is most hated one, Saying that java is nice because it works on all platforms is like saying that **** *** is fine because it works on all genres or I hate java because it's ******* slow, stupid ****, how many people do you think that actually hate a language because they have their own reason? 5? maybe 6? Rest are just talking **** because someone smarter than them said it so they try to look smarter. Me for example, I hate C# because of Micro$oft and its stupid one-line fixers that only leads to spaghetti code, yes, just for that, the rest is an over actuation of myself trying to look smarter because I try to point fails at someone else.

That's basically how the thing works here (or anywhere else). Once you see things like this you should ignore it and keep doing what you think it's the best.
manulaiko3.0 is offline  
Old 02/21/2017, 12:13   #15
 
elite*gold: 0
Join Date: Jul 2015
Posts: 13
Received Thanks: 1
Wink

Quote:
Originally Posted by manulaiko3.0 View Post
You did nothing wrong, is just that there are people that whatever you do, they will try to find a flaw on it and tell you a better way.
When coding it's more obvious, not only in this section, but everywhere. Have you ever seen someone talk **** about a programming language? Generally Java is most hated one, Saying that java is nice because it works on all platforms is like saying that **** *** is fine because it works on all genres or I hate java because it's ******* slow, stupid ****, how many people do you think that actually hate a language because they have their own reason? 5? maybe 6? Rest are just talking **** because someone smarter than them said it so they try to look smarter. Me for example, I hate C# because of Micro$oft and its stupid one-line fixers that only leads to spaghetti code, yes, just for that, the rest is an over actuation of myself trying to look smarter because I try to point fails at someone else.

That's basically how the thing works here (or anywhere else). Once you see things like this you should ignore it and keep doing what you think it's the best.

yep i can see that..
I`m going to ignore them:-D

And the reason why I'm posting this is because i want to create dark orbit bot that do everything and this is CORE if someone want 2.
Everything means- betting on auction, skylab, upgrades and etc. I can do everything except Killing npc, boxing and etc.. I'm trying to find easy way like it is in CANDY BOT.
Still nothing so if someone have advice for me.
Would be great.
And again sorry for my english
ramicek43 is offline  
Reply

Tags
darkorbit, vb, vb-darkorbit




All times are GMT +1. The time now is 02:54.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.