Search the Community
Showing results for tags 'arraydelete'.
Found 1 result
Hi, i'm currently facing problems with understanding how arrays work, or atleast a few commands that alter arrays. My current situation is: 1. I'm taking the process list and putting it all in an array 2. I want to remove the boring common windows processes 3. Profit And i'm currently stuck on step 2, while i already found this thread it dosn't seem that i can make it do what i want. Current code: Local $PList = ProcessList() Local $RL = ["smss.exe", "csrss.exe", "svchost.exe", "iexplore.exe", "chrome.exe", "conhost.exe"] Sleep(1) For $i=1 To Ubound($RL)-1 Sleep(1) While Not @Error $iIndex = _ArraySearch($PList, $RL[$i], 1, 0, 0, 1) _ArrayDelete($PList, $iIndex) WEnd Next It seems to remove all but smss.exe from the array list unless i have it two times in the array. Note: The sleep(1) is there to clear the error else the command wont fire for the rest of the array, any other way of doing it?