Message 1 of 11
get a list of index of selected items
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How can I generate a list of index of selected items?
I found this function, but it returns a list with values:
;-------------------------------------------------------------------------------
; set_multilist_value - Sets SentVar$ to list of the items selected in SentList$
; Arguments: 2
; SentList$ = String of the list variable name
; SentVar$ = String of the variable name
; Syntax: (set_multilist_value "ListName" "Variable")
;-------------------------------------------------------------------------------
(defun set_multilist_value (SentList$ SentVar$ / SubList@)
(setq SubList@ (eval (read SentList$)))
(set (read SentVar$) (list (nth (atoi $value) SubList@)))
(setq $value (substr $value (+ (strlen (itoa (atoi $value))) 2)))
(while (/= $value "")
(set (read SentVar$) (append (eval (read SentVar$))
(list (nth (atoi $value) SubList@)))
);set
(setq $value (substr $value (+ (strlen (itoa (atoi $value))) 2)))
);while
);defun set_multilist_value