|Version 1 (modified by AmigaPhil, 3 months ago) (diff)|
GetSelected -- Get the position of the messages selected in the current folder. (V2.0)
Gets the position of the messages selected in the current folder.
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
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.
/* Enable result codes */
/* 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
<STEM>NUM.COUNT was not initialized for empty folders. This was fixed in V2.4.