wiki:Documentation/ARexxAPI/GETSELECTED

Version 3 (modified by AmigaPhil, 10 months ago) (diff)

--

Languages:


ARexx API

    GETSELECTED

    NAME

    GetSelected -- Get the position of the messages selected in the current folder. (V2.0)

    TEMPLATE

    VAR/K,STEM/K

    FUNCTION

    Gets the position of the messages selected in the current folder.

    INPUTS

    VAR/K - alternative variable to put the results into instead of RESULT
    STEM/K - base name used for the stems where the returned data will be stored

    RETURNS

    VAR - space separated list of results
    <STEM>NUM.COUNT - number of selected messages
    <STEM>NUM.NR - position of the nth selected message, starting from 0; the message at the top of the list is also at position 0

    The result is just "0" if an empty folder or a folder group are currently selected.

    NOTES

    EXAMPLE

    /* Enable result codes */

    OPTIONS RESULTS

    /* Request info */

    GETSELECTED STEM st.

    /* Display results */

    SAY 'Messages selected: 'st.num.count
    DO i = 0 TO st.num.count-1

    SAY 'Position of msg #'i': 'st.num.i

    END

    BUGS

    <STEM>NUM.COUNT was not initialized for empty folders. This was fixed in V2.4.

    SEE ALSO