Clever1mba Posted May 12, 2005 Share Posted May 12, 2005 HELLOHow i can wait until process close then wait for file delete and then go for copyProcessClose("autoit.exe")FileDelete(@SystemDir & "\autoit.exe")FileCopy(d:\Newautoit.exe", @SystemDir & "\NewAutoit.exe") Link to comment Share on other sites More sharing options...
GaryFrost Posted May 12, 2005 Share Posted May 12, 2005 ProcessWaitClose SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
GaryFrost Posted May 12, 2005 Share Posted May 12, 2005 (edited) The help says the ProcessClose returns none try something like ProcessClose("autoit.exe") $PID = ProcessExists("autoit.exe") While $PID Sleep (1000) $PID = ProcessExists("autoit.exe") if $PID then ProcessClose($PID) endif Wend or ProcessClose("autoit.exe") $PID = ProcessExists("autoit.exe") if $PID then ProcessWaitClose($PID) endif Edited May 12, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
GaryFrost Posted May 12, 2005 Share Posted May 12, 2005 if(FileDelete(@SystemDir & "\autoit.exe")) then ; do something endif it's all in the help. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted May 13, 2005 Share Posted May 13, 2005 While FileExists("somefile.txt") FileDelete("somefile.txt")WEndOr you can compile the FileDelete() into a separate exe and do a RunWait. Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
buzz44 Posted May 13, 2005 Share Posted May 13, 2005 (edited) There are many ways you could do this, but I would do something like... $Program_1 = "blah.exe" $Program_2 = "test.exe" $Program_3 = "blahblah.exe" $Kill_Process = StringSplit($Program_1 & "," & $Program_2 & "," & $Program_3, ",") For $I = 1 To $Kill_Process[0] ProcessClose($Kill_Process[$I]) Next Edited May 13, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
JSThePatriot Posted May 13, 2005 Share Posted May 13, 2005 HELLO PLZ tell me easy way to put multi process your example works fine but need lots of type if process list more then 250 is there any to put list single line NOT LIKE $Program_1 = "blah.exe" AND then add StringSplit in this take more time to and take more space so i want to know single line addition way for multi process kill $Program_1 = "blah.exe"$Program_2 = "test.exe"$Program_3 = "blahblah.exe"$Kill_Process = StringSplit($Program_1 & "," & $Program_2 & "," & $Program_3, ",")For $I = 1 To $Kill_Process[0] ProcessClose($Kill_Process[$I])Nextlike webpage keyword added blah, blah.com etc it easy way to add<{POST_SNAPBACK}>If you dont want his advice then figure it out. He offered you the best way to do it. Now if you want another way it is right in his example. You can skip one step.Just do...$Kill_Process = StringSplit("blah.exe,test.ext,blahblah.exe,testtest.exe,blahtest.exe,etc.exe", ",")Just some thoughts,JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Helge Posted May 15, 2005 Share Posted May 15, 2005 @ asimzameer :Untested, but something like this might work :$stopservice = StringSplit("SharedAccess,wscsvc", ",") For $i = 1 To $stopservice[0] Sleep(10) RunWait(@ComSpec & " /c " & "net.exe stop " & $stopservice[$i],"",@SW_HIDE) NextGood luck !-Helge- 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