I am trying to make a view bot. Just for recreational/personal use. The problem is I am trying to make it so it will only open 20 windows at a time. It won't work for some reason. I also want it to wait 2000 milliseconds before closing the process it generates and go into a loop. I have co1unt as an integer. Anyone help please?
Code:
Dim Co1unt As Integer = 0
Public Sub Refreshlist()
Dim p As Process, co1unt As Integer, MyProgram As String = "iexplore"
For Each p In Process.GetProcesses
If p.ProcessName = MyProgram Then
co1unt = co1unt + 1
TextBox1.Text = co1unt
End If
Next
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Refreshlist()
Do
Refreshlist()
If Co1unt < 20 Then
Dim webAddress As String = ""
Dim p1 As Process = Process.Start(webAddress)
System.Threading.Thread.Sleep(2000)
p1.Kill()
End If
Loop
End Sub
Comment