[Gambas-devel] gb.desktop detect a running application
Sebastian Kulesz
sebikul at ...176...
Mon Aug 27 07:05:06 CEST 2012
I found on the TODO an entry for the gb.desktop component:
- Detect an already running application.
I had a need for that on another project. Is this what you are looking for?
----------
Public Function isRunning(sProcess as String) As Boolean
Dim sOutput As String
Exec ["pgrep", "-x", "-c", Shell(sProcess)] To sOutput
If CInt(Trim(sOutput)) > 0 Then Return True
Return False
End
----------
More information about the Devel
mailing list