KILL AN APP |
Author: |
Message: |
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: KILL AN APP
quote: Originally posted by novolo
could anyone post the script to kill an app with the windows api?
If we do that you wont ever learn. Look up GetWindowThreadProcessId
|
|
06-29-2006 02:21 PM |
|
|
novolo
Junior Member
L2Luna GM
Posts: 67
– / /
Joined: May 2006
|
O.P. RE: KILL AN APP
i've just entered that link, and sorry to say but i don't understand anything...
i'm not a programmer, could anyone just give me the code to kill an app? its only one line..
|
|
06-30-2006 12:13 AM |
|
|
CookieRevised
Elite Member
Posts: 15517 Reputation: 173
– / /
Joined: Jul 2003
Status: Away
|
RE: KILL AN APP
Proper code to kill an app is not just one code, it will contain many lines of code though.
.-= A 'frrrrrrrituurrr' for Wacky =-.
|
|
06-30-2006 04:45 PM |
|
|
novolo
Junior Member
L2Luna GM
Posts: 67
– / /
Joined: May 2006
|
O.P. RE: KILL AN APP
ohh, ok, any chance anyone knows how to do it?
|
|
06-30-2006 06:02 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: KILL AN APP
quote: Originally posted by novolo
ohh, ok, any chance anyone knows how to do it?
It is not that we don't know how to do it, its actually a bit complicated. There are many different ways of doing it for instance you can find the handle of the window, from that get the PID then send terminate process command to force it to close. Not the best way cause it doesn't provide the app enough time to save information.
|
|
06-30-2006 06:04 PM |
|
|
ShawnZ
Veteran Member
Posts: 3146 Reputation: 43
32 / /
Joined: Jan 2003
|
RE: KILL AN APP
it'd be something like
Interop.Call("user32.dll", "SendMessageA", WindowHandle, 274, 61536, 0);
This post was edited on 06-30-2006 at 06:54 PM by ShawnZ.
Spoiler: the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
|
|
06-30-2006 06:53 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: KILL AN APP
code: function ShutdownApp(hWnd){
var lProcessID = Interop.Allocate(4);
var lProcess = Interop.Allocate(4);
Interop.Call('user32', 'GetWindowThreadProcessId', hWnd, lProcessID);
lProcess.WriteDWORD(0, Interop.Call('kernel32', 'OpenProcess', 1, false, lProcessID.ReadDWORD(0)));
Interop.Call('kernel32', 'TerminateProcess', lProcess.ReadDWORD(0), 1);
Interop.Call('kernel32', 'CloseHandle', lProcess.ReadDWORD(0));
}
This was shown to me by Cook but I am too lazy to convert it to a Plus! script.
http://www.andreavb.com/tip020021.html
This post was edited on 07-01-2006 at 12:03 AM by matty.
|
|
06-30-2006 11:43 PM |
|
|
novolo
Junior Member
L2Luna GM
Posts: 67
– / /
Joined: May 2006
|
O.P. RE: KILL AN APP
any chance that this could be coded in plus script?
|
|
07-01-2006 12:17 AM |
|
|
dylan!
Senior Member
l33t p4int3r
Posts: 665 Reputation: 30
– / /
Joined: Jan 2005
|
RE: KILL AN APP
quote: Originally posted by novolo
any chance that this could be coded in plus script?
if your not a coder then what good does this do you?
and what good would it do you if it was in plus script?
if your coding a plus script and all you need is this part... how are you going to do the rest of it?
|
|
07-01-2006 12:22 AM |
|
|
novolo
Junior Member
L2Luna GM
Posts: 67
– / /
Joined: May 2006
|
O.P. RE: KILL AN APP
ok ok , i need this part for a script i made to run applications remotely... the thing is i can run applications remotely from a selected email but i dont know how to kill them... now if there's someone out there who is willing to help me rather than ask if i dont know or why am i doing this, or that i should't ask if i'm not a coder, you'r welcome..
|
|
07-01-2006 01:55 AM |
|
|
Pages: (3):
« First
«
1
[ 2 ]
3
»
Last »
|
|