On Wed, 2012-06-06 at 12:38 +0200, Rolf-Werner Eilert wrote: > Hi Bruce, > > I have successfully used this code which is from Jussi Lahtinen. I built > it into two of my applications, and it works reliably, at least under > Gambas2 on our somewhat older system: > > PUBLIC SUB Form_Open() > DIM sOutput AS String > > EXEC ["pgrep", "-f", "-l", "-u", System.User.Name, "Stein3.gambas"] > WAIT TO sOutput > > IF Split(Trim$(sOutput), gb.NewLine).Count > 1 THEN > QUIT > ENDIF > > Just replace "Stein3" by your binary's name. > > Regards > > Rolf
Nice! A lot quicker than using gb.Desktop. Sadly! It doesn't solve the problem of activating the desired window. And there is a slight "weird", it doesn't detect an instance that is running via the IDE. No idea, but don't really care much, that's not the problem. Ah well, back to Benoit's dbus suggestion. Oh, how I hate having to learn these "new" techo things. Back tomorrow. regards Bruce ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user