Windows kill process

Mike Bonner bonnmike at gmail.com
Mon Mar 11 14:17:21 EDT 2013


on windows use taskkill /F /IM processname.exe

/F is force, assuming /IM means all matches, but can't look it up at the
moment.

on mac or linux it seems that killall KeyTrapper should work, though you
might do a ps -ef at the command line and confirm caps and such to make
sure your match text is right. (not sure if its case sensitive or not,
seems like it should be)

You can also check the returned data, if its a 2 it means there was a
command error (on mac, probably on linux) if its a 1 it means no matches
were found OR not all were killed. Otherwise 0 is returned.


On Mon, Mar 11, 2013 at 11:48 AM, Thomas McGrath III <mcgrath3 at mac.com>wrote:

> Ok, so again I have still yet another problem I can't seem to figure out.
> After I launch my external key trapper app from livecode and then want to
> quit I can't seem to get it to quit.
>
> I have been trying all of these with what appears to be no luck:
>
> put the itemDelimiter into tItemDelimiter
> put the effective filename of this stack into tPath
> set the itemDelimiter to slash
> put item 1 to -2 of tPath into tPath
> set the itemDelimiter to tItemDelimiter
> put tPath & slash & "KeyTrapper.exe" into tKeyTrapperPath
> kill QUIT process tKeyTrapperPath
>
> or
> put the itemDelimiter into tItemDelimiter
> put the effective filename of this stack into tPath
> set the itemDelimiter to slash
> put item 1 to -2 of tPath into tPath
> set the itemDelimiter to tItemDelimiter
> put tPath & slash & "KeyTrapper.exe" into tKeyTrapperPath
> kill 9 process tKeyTrapperPath
>
> get shell("killall KeyTrapper")
>
> get shell("killall KeyTrapper.exe")
>
> get shell("killall keytrapper.exe")
>
> kill 9 process "KeyTrapper.exe"
>
>
> ANy ideas what I'm doing wrong here????
>
> Thank you,
>
> Tom
>
> -- Tom McGrath III
> http://lazyriver.on-rev.com
> mcgrath3 at mac.com
>
> _______________________________________________
> 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