Jump to content

File WaitClose


Recommended Posts

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 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

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 by Burrup

qq

Link to comment
Share on other sites

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])

Next

like 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

@ 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)
Next

Good luck !

-Helge-

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...