|Version 1 (modified by AmigaPhil, 3 months ago) (diff)|
AddrFind -- Find one or more entries in the address book. (V2.0)
Finds one or more entries in the address book, searching by default in the "Alias", "Real name", "E-mail address", "Description", "Street", "City" and "Country" fields.
VAR/K - variable to store the results of the query
STEM/K - base name used for the stems where the aliases for the address book entries matching the query will be stored
PATTERN/A - pattern used as search criterion; all the AmigaDOS wildcard characters are supported
NAMEONLY/S - restrict the search to the "Real name" field of the entries in the address book
EMAILONLY/S - restrict the search to the "E-mail address" field of the entries in the address book
VAR - string containing the number of entries matching the query and a space separated list of the matching aliases.
<stem>ALIAS.COUNT - number of matches found
<stem>ALIAS.NR - the nth alias in the list of aliases matching the query, nr being a number between 0 and n-1.
RC is set to 5 if no match is found.
Aliases are returned in the order they appear in the address book.
/* Enable result codes */
/* Find all the entries using a given provider */
ADDRFIND PATTERN '#?@saug.org' STEM st. EMAILONLY
/* List results */
IF RC = 0 THEN
DO i = 0 TO st.alias.count-1
SAY 'Match #'i+1': 'st.alias.i
SAY 'No matches found.'
AddrFind can't search into the "Alias" or "Description" fields of groups.