Preventing multiple instances of a Windows app - still a problem
Mike Bonner
bonnmike at gmail.com
Sun Dec 4 11:27:43 EST 2011
wow. I can tell how long i've been away from a windows command line. Didn't
know about tasklist. Thanks!
On Sun, Dec 4, 2011 at 9:20 AM, Mark Schonewille <
m.schonewille at economy-x-talk.com> wrote:
> I see. I have been using:
>
> function programs
> if the platform is "MacOS" then -- only OSX!
> put shell("ps -xcw") into myList
> put offset("COMMAND",myList) into myColPos
> repeat for each line myLine in myList
> put char myColPos to -1 of myLine & cr after myNewList
> end repeat
> filter myNewList without "(*"
> return line 2 to -1 of myNewList
> else if the platform is "Win32" then
> put line 4 to -1 of shell("tasklist") into myList
> repeat for each line myLine in myList
> put word 1 of myLine & cr after myNewList
> end repeat
> return line 1 to -2 of myNewList
> else
> return empty
> end if
> end programs
>
> but I am not sure that this works on Win XP Home for example.
>
> Graham, could you post your current VBScript or provide a link to that
> script in the discussion of May?
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
>
> Become our partner in sales http://qery.us/1bq Start selling Color
> Converter today. 20% commission!
>
> On 4 dec 2011, at 16:37, Mike Bonner wrote:
>
> > Not sure the app in question is an lc app. Doesn't it only apply if thats
> > the case? If it is an lc app, then yeah relaunch is perfect.
> >
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list