udfAskItemlist
str udfAskItemlist (str, str, str, int, int, bln)
;----------------------------------------------------------------------------------------------------------------------
#DefineFunction udfAskItemlist (strAI_Title, strAI_List, strAI_ListDelimiter, intAI_SortMode, intAI_SelectMode, blnAI_SelectRequired)
Return AskItemlist (strAI_Title, strAI_List, strAI_ListDelimiter, intAI_SortMode, intAI_SelectMode, blnAI_SelectRequired)
:CANCEL
Return "" ; Return empty string if Dialog has been cancelled resp. closed by escape key.
#EndFunction
;----------------------------------------------------------------------------------------------------------------------


; Test.

strFileThis = IntControl (1004, 0, 0, 0, 0) ; We use the words from this file as test input.
strText = FileGet (strFileThis)
strText = StrReplace (strText, @CRLF, " ")

strAI_Title          = "Select an item from the list"
strAI_List           = strText
strAI_ListDelimiter  = " "
intAI_SortMode       = @UNSORTED
intAI_SelectMode     = @SINGLE
blnAI_SelectRequired = @TRUE

strItem = udfAskItemlist (strAI_Title, strAI_List, strAI_ListDelimiter, intAI_SortMode, intAI_SelectMode, blnAI_SelectRequired)

Message ("Selected item is ...", strItem)

:CANCEL
Exit