bobheart Posted August 23, 2004 Share Posted August 23, 2004 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 More sharing options...
Valik Posted August 23, 2004 Share Posted August 23, 2004 There are quotes around the entire string in the Run() command. Wouldn't it be easier to use ProcessClose()? Link to comment Share on other sites More sharing options...
bobheart Posted August 23, 2004 Author Share Posted August 23, 2004 I'll give that a try , I forgot about it . lol Link to comment Share on other sites More sharing options...
bobheart Posted August 23, 2004 Author Share Posted August 23, 2004 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 More sharing options...
this-is-me Posted August 23, 2004 Share Posted August 23, 2004 Don't use quotes around variables. Who else would I be? Link to comment Share on other sites More sharing options...
bobheart Posted August 23, 2004 Author Share Posted August 23, 2004 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) Link to comment Share on other sites More sharing options...
Developers Jos Posted August 23, 2004 Developers Share Posted August 23, 2004 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) 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 More sharing options...
bobheart Posted August 23, 2004 Author Share Posted August 23, 2004 So your saying it should look like this ? InputBox("Process to kill?:, $Process, ".exe", "", -1, -1, 0, 0) Link to comment Share on other sites More sharing options...
Developers Jos Posted August 23, 2004 Developers Share Posted August 23, 2004 (edited) 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) Edited August 23, 2004 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 More sharing options...
bobheart Posted August 23, 2004 Author Share Posted August 23, 2004 You know whats funny , I got it working in one hour with ahk but I can never get anything to work au3 ? Link to comment Share on other sites More sharing options...
Developers Jos Posted August 23, 2004 Developers Share Posted August 23, 2004 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? 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 More sharing options...
bobheart Posted August 23, 2004 Author Share Posted August 23, 2004 I got it to work now .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 More sharing options...
bobheart Posted August 23, 2004 Author Share Posted August 23, 2004 You know whats funny , I got it working in one hour with ahk but I can never get anything to work au3 ? <{POST_SNAPBACK}>I never know where to put the "" . Or the & . Link to comment Share on other sites More sharing options...
Developers Jos Posted August 23, 2004 Developers Share Posted August 23, 2004 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... 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 More sharing options...
bobheart Posted August 23, 2004 Author Share Posted August 23, 2004 Don't think thats much different in V2 or AHK.. but thats why we invented F1F1? whats that going to do ? Link to comment Share on other sites More sharing options...
Developers Jos Posted August 23, 2004 Developers Share Posted August 23, 2004 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... 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 More sharing options...
this-is-me Posted August 23, 2004 Share Posted August 23, 2004 F1 is help. @jdeb, if you read his signature, you will see he has a disibility. Who else would I be? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now