So Ive been coding this thing for a while. And now its working and such except when a realm goes down it doesnt restart. I know the problem which is that it looks for the process name of the world.exe to restart it and since its a multi realm the exe is all the same name so it detects the working one. How can I fix this. Code below
Button Code (Exe Start)
Code:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
worldtime1.Enabled = True
If (File.Exists(TextBox2.Text)) Then
Process.Start(TextBox2.Text)
PictureBox2.BackColor = Color.Lime
Else
MessageBox.Show("ERROR: File settings not found")
PictureBox2.BackColor = Color.Yellow
End If
End Sub:confused::wave:
Timer Code (Process Restarter)
Code:
'Start Of Worldtime Timers Code'
Private Sub worldtime1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles worldtime1.Tick
If True Then
If Process.GetProcessesByName("ascent-world").Length = 0 Then
Process.Start(Me.TextBox2.Text)
End If
End If
End Sub