Luigi 38 Posted September 7, 2011 (edited) Hi, I try find a value in one $avArray, get your position, and retrieve another value in the same position in anoter $avArray2. It's work with any value <> 0. If I search 'a' letter, the script return all $avArray2... But I want only letter 'A'. I make wrong code or exist sintax error? #include <Array.au3> Local $avArray[5] = ["a", "b", "c", "d", "e"] Local $avArray2[5] = ["A", "B", "C", "D", "E"] $find = "b" Local $aiResult = _ArrayFindAll($avArray, $find) ConsoleWrite("The letter '" & $find & "' was found in position '" & _ArrayToString($aiResult) & "'." & @LF) ConsoleWrite(_ArrayToString($avArray2,"",_ArrayToString($aiResult),_ArrayToString($aiResult)) & @LF) Thanks. ^^ Edited September 7, 2011 by detefon Visit my repository Share this post Link to post Share on other sites
Herb191 4 Posted September 7, 2011 I am not sure if this is what your are looking for... #include <Array.au3> Local $avArray[6] = ["a", "b", "c", "d", "e", "f"] Local $avArray2[6] = ["A", "B", "C", "D", "E", "A"] $find = "a" Local $aiResult = _ArrayFindAll($avArray, $find) ConsoleWrite("The letter '" & $find & "' was found in position '" & _ArrayToString($aiResult) & "'." & @LF) For $i = 0 To UBound($aiResult, 1) -1 ConsoleWrite($avArray2[$aiResult[$i]] & @LF) Next Share this post Link to post Share on other sites
Luigi 38 Posted September 7, 2011 Yes Herb191, that is this! Work fine, thank you! Namaste! Visit my repository Share this post Link to post Share on other sites