Ru ... It is not the answer to our query... It's just workarounds
Le 6 oct. 2012 00:18, "Ru Vuott" a écrit :
> Another possibility with "xprop" and DesktopWindows class.
> It need to activate gb.desktop.
>
> ***
>
> Private i As Integer
>
>
> Public Sub Form_Open()
>
> Dim
By using "xprop", you can choose the window of program via mouse !
> Another possibility with "xprop" and
> DesktopWindows class.
> It need to activate gb.desktop.
>
> ***
>
> Private i As Integer
>
>
> Public Sub Form_Open()
>
> Dim pr As Process
> Dim ss, x As
Another possibility with "xprop" and DesktopWindows class.
It need to activate gb.desktop.
***
Private i As Integer
Public Sub Form_Open()
Dim pr As Process
Dim ss, x As New String[]
Dim s, y As String
Dim j As Byte
pr = Shell "xprop | grep -i window" For
How about something like this:
Dim sOutput As String
Exec ["pgrep", "-f", "NameOfTheProgram.gambas"] Wait To sOutput
If Split(Trim$(sOutput), gb.NewLine).Count = 1 Then
Exec ["kill", sOutput]
Else
'Multiple instances found, do something else...
Endif
Jussi
On Fri, Oct 5, 2012 at 7:00 PM, Ru
> >
> No, not really exceptional and in fact not really rare.
>
> There is no reason to think that one of your gambas projects
> may have a
> single instance running unless that is a particular
> RULE.
It seems to me the problem was: e.g. I have 3 running gambas program:
a.gambas
b.gambas
c.ga
On Fri, 2012-10-05 at 16:24 +0100, Ru Vuott wrote:
> > >
> > >
> > Even that is risky, because if you have more than one
> > instance of the
> > same executable running .. you will send a SIGTERM to all of
> > them.
> >
>
> Ok... but this is an exceptional and rare eventuality !!! no ?
>
No,
> >
> >
> Even that is risky, because if you have more than one
> instance of the
> same executable running .. you will send a SIGTERM to all of
> them.
>
Ok... but this is an exceptional and rare eventuality !!! no ?
---
On Fri, 2012-10-05 at 11:20 +0100, Ru Vuott wrote:
> ...this is a possible way:
>
>
> Public Sub Button1_Click()
>
> Dim s1, s2, pid As String
>
>
> s1 = InputBox("Insert the program name (without its extension
> .gambas):")
>
>
> For Each pid In Dir("/proc
On Fri, 2012-10-05 at 14:56 +0100, Ru Vuott wrote:
> The name of "process" is here:
>
> /proc/PID_number/comm
>
>
> The directory of program;
>
> /proc/PID_number/cmdline
>
>
> bye
> vuottt
>
>
or just
ps x| grep gbr
but I'm not sure that I really understand the problem here
<> m
a scritto:
>
>> Da: abbat
>> Oggetto: Re: [Gambas-user] R: My programm name of process
>> A: gambas-user@lists.sourceforge.net
>> Data: Venerdì 5 ottobre 2012, 15:39
>>
>> Hi,
>>
>> I'm sure it's good way, but we need individual proces
The name of "process" is here:
/proc/PID_number/comm
The directory of program;
/proc/PID_number/cmdline
bye
vuottt
--- Ven 5/10/12, abbat ha scritto:
> Da: abbat
> Oggetto: Re: [Gambas-user] R: My programm name of process
> A: gambas-user@lists.sourceforge.ne
Hi,
I'm sure it's good way, but we need individual process name for each .gambas
program not only to kill it.
I use two and more different .gambas programs at one time and I need to see
them in process list.
For now my process list looks like this:
Process list:
pcmanfm
lxterminal
gbr3
gbr3
gbr
...this is a possible way:
Public Sub Button1_Click()
Dim s1, s2, pid As String
s1 = InputBox("Insert the program name (without its extension
.gambas):")
For Each pid In Dir("/proc")
If Exist("/proc/" & pid & "/cmdline") Then
s2 = File.Load(
13 matches
Mail list logo