Jump to content

Script is too good


Recommended Posts

#include <Process.au3>
$pid = 0
For $i=1 To 3000
$kill = _ProcessGetName($pid)
if $pid <> "killall.exe" Then ProcessClose($pid)
$pid= $pid +1
Next

I need help with that script,I made it to kill all progresses but it reset-s machine (force restart)

how i can make it so that it only kills tasks?

You need compile it 1-st

Edited by au3scr
Link to comment
Share on other sites

Try this maybe:

$var = WinList()

For $i = 1 to $var[0][0]
  If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then
      If Not StringInStr($var[$i][0],"Program Manager") Then
          WinKill($var[$i][0])
    EndIf
 EndIf
Next

Func IsVisible($handle)
  If BitAnd( WinGetState($handle), 2 ) Then 
    Return 1
  Else
    Return 0
  EndIf

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