> Hello Yousfi,
>
>
> the program ist running - many thanks. Now i can control and stop a process. There is a little error in your script:
>
> If you want to kill a process:
>
>
> FOR EACH loProcess IN loResult
> if allt(loProcess.name)="yourexe"
> loProcess.Terminate(0)
> endi
> NEXT
>
>
> At all: many thanks, my problem is now solved.
>
>
> Best Regards,
>
>
> Markus
>
>
>
>
>
>
> > Welcome
> >
> > I give you a small script who can returns you a the answer.
> > put your exec name in "yourexe" (juststem only)
> >
> > LOCAL loWMI, lcQuery, loResult, loProcess
> > loWMI = GetObject("winmgmts://")
> > lcQuery = "select * from win32_process where name='"+yourexe+"'"
> > loResult = loWMI.ExecQuery(m.lcQuery)
> >
> > if loResult.count=0
> > *well ..Run your programm run/n
> > else
> > oo="Application running"
> > messagebox(yourexe+" is already running !",0+32+4096,oo)
> > endi
> >
> >
> > if you want to kill your application "yourexe" if running terminate the script above with this
> >
> > FOR EACH loProcess IN loResult
> > if loProcess.name="yourexe"
> > loProcess.Terminate(0)
> > endi
> > NEXT
> >
> >
> > You can also use windows API (FindWindowEx).se this News2News link where you must know the title of your window appplication.
> >
> >
http://www.news2news.com/vfp/?function=-1&example=45> >
> > You must modify it a bit for testing if your window title is in the cursor.
> >
> > count for "Yout application exact title" $ wintitle to xrun
> > if xrun=0
> > *application not running
> > else
> > *application running
> > endi
> >
> > you can also see this link in the same subject
> >
http://www.ml-consult.co.uk/foxst-11.htm> > Regards
> > Yousfi Benameur
That if you have SET EXACT ON -i have SET EXCAT OFF (default) on my vfp.
ON :Specifies that expressions must match character for character when comparing character data, to be equivalent.
Don Kechen