Public Sub Form_Open()
CheckFox
End
Public Sub BuExit_Click()
Me.Close
End
Public Sub BuKillFox_Click()
Shell "pkill 'firefox'"
Wait 0.5
BuKillFox.Enabled = False
CheckFox
End
Public Sub CheckFox()
Dim sState As String
sState = Null
Shell "pgrep -x 'firefox'" To sState
Wait 0.5
If sState = Null Then
Label1.text = "FireFox Not Running"
Else
Label1.Text = "FireFox Is Running"
BuKillFox.Enabled = True
Endif
End
You will nee to create a Label and two buttons. I used BuExit, BuKillFox names for the buttons and Label1 for the text box. Feel free to modify the program to your tastes.