From the Help file about _ArrayDisplay:
Run User Func
Run the user-defined function passed in $hUser_Function. This function is entirely separate from the UDF and must be created and coded by the user to accept 2 (and only 2) parameters which will be provided by the UDF itself: the full array being displayed and a 1D array holding the selected rows indices with a count in the [0] element. These parameters can then be used inside the user function as required. The button is not displayed if no function is specified.
And the code:
#include <Array.au3>
Global $aSelRows
Global $aArray[10][6]
For $i = 0 To 9
For $j = 0 To 5
$aArray[$i][$j] = $i & "/" & $j
Next
Next
_ArrayDisplay( $aArray, "Select one/more items. Click ""Run User Func""", "", 0, Default, Default, Default, Default, GetSelected )
Func GetSelected( $aArray, $aSelected )
$aSelRows = $aSelected
If $aSelRows[0] = 0 Then
MsgBox( 0, "", "Select one/more items. Click ""Run User Func""" )
Else
MsgBox( 0, "", $aSelRows[0] & " items selected" )
Send( "{ESC}" )
EndIf
EndFunc
_ArrayDisplay( $aSelRows )