TastyTeo
Member
- Joined
- May 31, 2011
- Messages
- 15
- Programming Experience
- 1-3
Hello this is my code
The problem is that, when it checks that the AbsoluteUri ends with profile it should skip the other 3 commands and make another command (To enable the timer2 at the same time) Is this possible to make this? if yes how?
VB.NET:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If WebBrowser1.Document.Url.AbsoluteUri.ToString.EndsWith("profile") Then MsgBox("it looks you are already logged in, starting bot...") and Timer2.Enabled = True
WebBrowser1.Document.GetElementById("user").SetAttribute("value", TextBox2.Text)
WebBrowser1.Document.GetElementById("pass").SetAttribute("value", TextBox3.Text)
WebBrowser1.Document.Forms(0).InvokeMember("submit")
End Sub
The problem is that, when it checks that the AbsoluteUri ends with profile it should skip the other 3 commands and make another command (To enable the timer2 at the same time) Is this possible to make this? if yes how?