close program

Posts 1–12 of 12 · Page 1 of 1
close program
hi,

sorry for my bad english.

ich want to make a program which close any programm mit an button and hokey.

what is the correct code for close a program?

mopo
To close application is

Code:
End
hotkey
(if getkeypress(vbkeyA) then
end
end sub
thx,

but i want to close a program like warrock or media player.

not the hack.

mopo
Then use

Shell("TASKKILL /F /IM "PnkBstrA.exe")
sorry,

i dont understand.can you post the code plz.

mopo
Quote Originally Posted by mopo View Post
sorry,

i dont understand.can you post the code plz.

mopo
He just did. If you want it in a hotkey it would be like this:

Code:
If GetKeyPress (vbKeyA) Then
Shell("TASKKILL /F /IM "PnkBstrA.exe")
End Sub
Replace PnkBstrA.exe with whatever the programs process is that you want to close.

WarRock:
Code:
Shell("TASKKILL /F /IM "Warrock.exe")
WMP (Windows Media Player):
Code:
Shell("TASKKILL /F /IM "wmplayer.exe")
i get an error.

"syntaxfehler"

mopo
Yo, u must declare if get keypress...

Public Declare Function GetkeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
oh sorry,

i forgot.

ty
hmm,

new error:

erwartet listentrennzeichen oder )

must i write the code in a butoon or in a timer?

mopo
Quote Originally Posted by w00t? View Post
Then use

Shell("TASKKILL /F /IM "PnkBstrA.exe")
what this would do is end a process, defined here:
Shell("TASKKILL /F /IM "PnkBstrA.exe")

so change that to "WarRock.exe" (without the quotes as they are already there) then it would close War Rock
hmm,

new error:

erwartet listentrennzeichen oder )

must i write the code in a butoon or in a timer?

mopo
dont have any idea on that, though.
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?