Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Cycle through the array checking every element

$
0
0

Hi, I'm pretty new to AutoIt (I can only imagine how many times did you read something like that :) ). 
I'm trying to make a simple script for personal use. What I need from it is to cycle through the arrayed list of processes and kill it if it exists.
This is what I came up to:
 

  1.     Local $Pss[4]
  2.      $Pss[0]="notepad.exe"
  3.      $Pss[1]="qip.exe"
  4.      $Pss[2]="Skype.exe"
  5.      $Pss[3]="Opera.exe"
  6.  
  7. Func KillALl()
  8.      
  9.     For $s = 0 To $s = 4
  10.         if ProcessExists($Pss[$s]) then
  11.             ProcessClose($Pss[$s])
  12.             Sleep(100)
  13.         EndIf
  14.         Next
  15.  

Obviously it doesn't work I can't find anything similiar on the net. 


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>