Public Class Form1
Private x, y, z As Integer
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim fileReader As System.IO.StreamReader
fileReader =
My.Computer.FileSystem.OpenTextFileReader("info.txt")
Dim stringReader1, stringReader2, stringReader3 As String
stringReader1 = fileReader.ReadLine()
stringReader2 = fileReader.ReadLine()
stringReader3 = fileReader.ReadLine()
WebBrowser1.Navigate(stringReader1)
TextBox1.Text = stringReader2
TextBox2.Text = stringReader3
Me.Enabled = False
WebBrowser1.Visible = False
Timer2.Enabled = True
End Sub
Private Sub navigateGrup()
WebBrowser1.Refresh()
Dim Page As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("a")
ListBox1.Items.Clear()
For Each Element As HtmlElement In Page
If Element.GetAttribute("href").Contains("/groups") Then
If Element.GetAttribute("href").Contains("/groups/create") Then GoTo asd
If Element.GetAttribute("href").Contains("/groups/?") Then GoTo asd
ListBox1.Items.Add(Element.GetAttribute("href").ToString())
asd:
End If
Next
Timer1.Interval = 3000
Timer1.Enabled = True
Timer1.Start()
End Sub
Private Sub navigateLogout()
WebBrowser1.Refresh()
Dim Page As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("a")
ListBox1.Items.Clear()
For Each Element As HtmlElement In Page
If Element.GetAttribute("href").Contains("/logout") Then
WebBrowser1.Navigate(Element.GetAttribute("href").ToString())
End If
Next
End Sub
Private Sub navigateBegen()
WebBrowser1.Refresh()
Dim Page As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("a")
ListBox2.Items.Clear()
For Each Element As HtmlElement In Page
If Element.GetAttribute("href").Contains("/like.php?") Then
ListBox2.Items.Add(Element.GetAttribute("href").ToString())
End If
Next
Timer3.Interval = 3000
Timer3.Enabled = True
Timer3.Start()
End Sub
Private Sub navigateMsjYaz()
WebBrowser1.Refresh()
Dim Page As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("a")
ListBox3.Items.Clear()
For Each Element As HtmlElement In Page
If Element.GetAttribute("href").Contains("compose/?ids=") Then
ListBox3.Items.Add(Element.GetAttribute("href").ToString())
End If
Next
Timer4.Interval = 3000
Timer4.Enabled = True
Timer4.Start()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
WebBrowser1.Document.GetElementById("email").SetAttribute("value", TextBox1.Text)
WebBrowser1.Document.GetElementById("pass").SetAttribute("value", TextBox2.Text)
WebBrowser1.Document.GetElementById("login").InvokeMember("click")
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim durum As HtmlElement = WebBrowser1.Document.GetElementById("xc_message")
durum.SetAttribute("value", "deneme duvar yazısı")
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
navigateGrup()
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
x = x + 1
If x > ListBox1.Items.Count Then
Timer1.Stop()
Else
ListBox1.SelectedIndex = x - 1
WebBrowser1.Navigate(ListBox1.Items(x - 1).ToString)
End If
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
navigateLogout()
End Sub
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
navigateLogout()
Me.Enabled = True
WebBrowser1.Visible = True
Timer2.Enabled = False
End Sub
Private Sub MemoEdit1_EditValueChanged(sender As Object, e As EventArgs)
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
navigateBegen()
End Sub
Private Sub ListBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox2.SelectedIndexChanged
End Sub
Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles Timer3.Tick
y = y + 1
If y > ListBox2.Items.Count Then
Timer3.Stop()
Else
ListBox2.SelectedIndex = y - 1
WebBrowser1.Navigate(ListBox2.Items(y - 1).ToString)
End If
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
navigateMsjYaz()
End Sub
Private Sub Timer4_Tick(sender As Object, e As EventArgs) Handles Timer4.Tick
z = z + 1
If z > ListBox3.Items.Count Then
Timer4.Stop()
Else
ListBox3.SelectedIndex = z - 1
WebBrowser1.Navigate(ListBox3.Items(z - 1).ToString)
End If
End Sub
End Class