Clever1mba 0 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") Share this post Link to post Share on other sites
GaryFrost 18 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. Share this post Link to post Share on other sites
GaryFrost 18 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. Share this post Link to post Share on other sites
GaryFrost 18 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. Share this post Link to post Share on other sites
MSLx Fanboy 0 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()) Share this post Link to post Share on other sites
buzz44 1 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 Share this post Link to post Share on other sites
JSThePatriot 18 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 LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites
Helge 3 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- Share this post Link to post Share on other sites