Sign in to follow this  
Followers 0
doohoodogg

processes

4 posts in this topic

it is possible to make somehow a script that terminate all started processes but not the "x" ones, where x are processes chosen by me.

i used ps kill but that is not possible with it.

thx

Share this post


Link to post
Share on other sites



Sure it is, just use something like this:

$excludeprocess1 = "Your Process"
$excludeprocess2 = "Your Second Process"
etc...

$processes = ProcessList()
For $i = 1 to $processes[0][0]
    If $processes[$i][0] <> $excludeprocess1 And $processes[$i][0] <> $excludeprocess2 etc... Then ProcessClose($processes[$i][0])
Next

Alzo


Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Share this post


Link to post
Share on other sites

$excludeprocess1 = "Your Process"
$excludeprocess2 = "Your Second Process"
etc...

$processes = ProcessList()
For $i = 1 to $processes[0][0]
    If $processes[$i][0] = $excludeprocess1 OR $processes[$i][0] = $excludeprocess2 etc... Then ProcessClose($processes[$i][0])
Next

Another version if you dont understand other one :D


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

$excludeprocess1 = "Your Process"
$excludeprocess2 = "Your Second Process"
etc...

$processes = ProcessList()
For $i = 1 to $processes[0][0]
    If $processes[$i][0] = $excludeprocess1 OR $processes[$i][0] = $excludeprocess2 etc... Then ProcessClose($processes[$i][0])
Next

Another version if you dont understand other one :D

true, but only if you want to close your defined excludeprocesses .. :D Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0