I tried my prototype, and it run ! If I try to run two times the same program... the second doesen't start !!! :-)
It founded on: ps -aux | grep my_gambas__program In fact, i f you run that line in your Terminal, you can see the PID of "my_gambas_program". Uhmm... 1) Change this line: Try Shell "kill " & plura[b] With: Print plura[b] 2) Create an executive. Then you have run this executive. 3) Then run in Terminal: ps -aux | grep my_gambas_executive and see PID of executive. 4) Then run the program (now I mean the project, not the executive) from that you created the executive and see in console if a (between many) string-variable plura[b] has then PID number of executive. --- Mar 13/3/12, abbat <abbat...@mail.ru> ha scritto: > Da: abbat <abbat...@mail.ru> > Oggetto: Re: [Gambas-user] R: Prog.gambas only one process - RECTIUS !!! > A: gambas-user@lists.sourceforge.net > Data: Martedì 13 marzo 2012, 09:11 > > Does not work. > I guess because programm.gambas is not shown ib process list > so we can not > find what to "kill" > > > Vuott wrote: > > > > Excuse me, a little problem at name of program (before > it was strange > > "aaaaaaaaaaaaaaa"): > > I re-send the code: > > > > <<<<< > > > > Public Sub Form_Open() > > > > Dim index As String > > Dim plura As String[] > > Dim a, b, c As Integer > > > > Shell "ps -aux | grep " & "my_gambas__program" To > index > > > > > > plura = Split(index, " ") > > > > c = plura.Count > > > > For a = 0 To c - 1 > > > > > > If Right(plura[a], 20) Like "*.gambas*" Then > > > > For b = a To 100 > > > > > > Try Shell "kill " & > plura[b] > > Next > > Endif > > > > > > Next > > > > End > > > >>>>>>>>>>>> > > > > > > > > > > > > --- Mar 13/3/12, abbat <abbat...@mail.ru> > ha scritto: > > > >> Da: abbat <abbat...@mail.ru> > >> Oggetto: [Gambas-user] Prog.gambas only one > process > >> A: gambas-user@lists.sourceforge.net > >> Data: Martedì 13 marzo 2012, 00:44 > >> > >> How to allow to run only one copy of prog.gambas? > >> I tried to: > >> Shell ["killall", "prog.gambas"] > >> on form open... > >> But there is no such a process when prog.gambas is > running/ > >> > >> > >> -- > >> View this message in context: > >> http://old.nabble.com/Prog.gambas-only-one-process-tp33491262p33491262.html > >> Sent from the gambas-user mailing list archive at > >> Nabble.com. > >> > >> > >> > ------------------------------------------------------------------------------ > >> Try before you buy = See our experts in action! > >> The most comprehensive online learning library for > Microsoft > >> developers > >> is just $99.99! Visual Studio, SharePoint, SQL - > plus HTML5, > >> CSS3, MVC3, > >> Metro Style Apps, more. Free future releases when > you > >> subscribe now! > >> http://p.sf.net/sfu/learndevnow-dev2 > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > > > > ------------------------------------------------------------------------------ > > Keep Your Developer Skills Current with LearnDevNow! > > The most comprehensive online learning library for > Microsoft developers > > is just $99.99! Visual Studio, SharePoint, SQL - plus > HTML5, CSS3, MVC3, > > Metro Style Apps, more. Free future releases when you > subscribe now! > > http://p.sf.net/sfu/learndevnow-d2d > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > -- > View this message in context: > http://old.nabble.com/Prog.gambas-only-one-process-tp33491262p33492643.html > Sent from the gambas-user mailing list archive at > Nabble.com. > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft > developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, > CSS3, MVC3, > Metro Style Apps, more. Free future releases when you > subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user