Jump to content

kill process


Recommended Posts

I want to run a small app that will kill a process but need to use a input box .

I have this but it is trying to run the name process and not the kill program .

What do I have wrong and how can I fix it ?

Dim $Process
$Process = InputBox("$Process", "Process to kill?", ".exe", "", -1, -1, 0, 0)
;Places the input box in the top left corner displaying the characters as they are typed.
if $Process then
Run(@ComSpec & " /k pskill.exe & $Process & ")
else 
    Exit
EndIf
Link to comment
Share on other sites

Same thing ? what do I have wrong here Valik .. I think I need to see how it is done then I will get it . lol

Dim $Process
$Process = InputBox("$Process", "Process to kill?", ".exe", "", -1, -1, 0, 0)
ProcessClose("$Process")
MsgBox(4096, "Test", $Process, 10)
Link to comment
Share on other sites

  • Developers

Still can't get it to work ?

Dim $Process
InputBox($Process, "Process to kill?", ".exe", "", -1, -1, 0, 0)
ProcessClose($Process)
MsgBox(4096, "Test", $Process, 10)

<{POST_SNAPBACK}>

Did you check the value of $Process? with this code it will be ""/blank/empty.

The result of an InputBox should be infront of an equal sign....

$answer = InputBox("Question", "Where were you born?", "Planet Earth", "", -1, -1, 0, 0)

:ph34r:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

So your saying it should look like this ?

InputBox("Process to kill?:, $Process, ".exe", "", -1, -1, 0, 0)

<{POST_SNAPBACK}>

no... thats not what i am saying.

why did you change the below line that was in the previous version?

$Process = InputBox("$Process", "Process to kill?", ".exe", "", -1, -1, 0, 0)

:ph34r:

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

You know whats funny , I got it working in one hour with ahk but I can never get anything to work au3 ?

<{POST_SNAPBACK}>

.... meaning? :ph34r:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

I never know where to put the "" .

Or the & .

<{POST_SNAPBACK}>

Don't think thats much different in V2 or AHK.. but thats why we invented F1... :ph34r:

:(

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Don't think thats much different in V2 or AHK.. but thats why we invented F1

F1? whats that going to do ?

<{POST_SNAPBACK}>

yea right... :ph34r:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...