Search the Community
Showing results for tags 'arraysearch'.
-
Anyone know why _ArraySearch is not finding an entry with a single quote in it? Here is an example: #include <array.au3> Dim $array[3][2] $array[0][0] = "Testing is****fun" $array[1][0] = "Don't mess with me kid" $array[2][0] = "blah'blah" _ArrayDisplay($array) $index = _ArraySearch($array, "blah'blah", 0, 0, 0, 0, 1, 1) MsgBox(262144, 'Debug line ~' & @ScriptLineNumber, 'Selection:' & @CRLF & '$index' & @CRLF & @CRLF & 'Return:' & @CRLF & $index) ;### Debug MSGBOX
- 2 replies
-
- array
- arraysearch
-
(and 1 more)
Tagged with:
-
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[6] = ["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?
- 8 replies
-
- array
- arraysearch
-
(and 1 more)
Tagged with:
-
Hello everybody, so I might found a bug in _ArraySearch: #include <Array.au3> Local $abc[2] = ["b", "b"] $h = "+---------------------------------+" & @CRLF ConsoleWrite($h) For $i = 0 To 1 $abc[0] = 0 out() $abc[0] = 1 out() $abc[0] = -1 out() $abc[0] = "Abc" out() $abc[1] = "Hello" Next Func txt() Return "$abc = [" & $abc[0] & ", " & $abc[1] & "]" & @CRLF & _ "> _ArraySearch($abc,""Hello"") = " EndFunc ;==>txt Func shouldoutput($ans) Return "_ArraySearch Should return: " & ($ans ? 1 : -1) EndFunc ;==>shouldoutput Func out() ConsoleWrite("> " & txt() & _ArraySearch($abc, "Hello") & @CRLF & "> " & shouldoutput($abc[1] == "Hello") & @CRLF & $h) EndFunc ;==>out Exit Sorry for this messy script
- 5 replies
-
- _arraysearch
- array
-
(and 2 more)
Tagged with: