#include <array.au3>
Local $array[1][2]
Local $x = 0, $i = 1, $q
$coord = PixelSearch(0, 0, 20, 300, 0x000000, 10)
$struct = DllStructCreate('int;int')
DllStructSetData($struct, 1, $coord[0])
DllStructSetData($struct, 2, $coord[1])
$array[0][0] = $coord[0]
$array[0][1] = $coord[1]
_ArrayDisplay($array)
While 1
$coord = PixelSearch(0, 0, 20, 300, 0x000000, 10)
If Not @error Then
If DllStructGetData($struct, 1) <> $coord[0] Or DllStructGetData($struct, 2) <> $coord[1] Then
$x += 1
$i += 1
ReDim $array[$i][2]
$array[$x][0] = $coord[0]
$array[$x][1] = $coord[1]
DllStructSetData($struct, 1, $coord[0])
DllStructSetData($struct, 2, $coord[1])
EndIf
EndIf
If UBound($array, 1) = 10 Then ExitLoop
Sleep(100)
WEnd
_ArrayDisplay($array)