我正在尝试制作视图机器人。仅供娱乐/个人使用。问题是我试图这样做,所以它一次只能打开20个窗口。它不会出于某种原因。我还希望它在关闭它生成的进程并进入循环之前等待2000毫秒。我把co1unt作为整数。有人帮忙吗?
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