/* All2Userlist.spot İ 1993 PSR Software */
/* ŻŻŻŻŻŻŻŻŻŻŻŻ             ŻŻŻŻŻŻŻŻŻŻŻŻ */
/* '$VER: All2Userlist v2.0 (25.8.93)'   */

address SPOT
options results

LF='0d'x

'isiconified'
if rc=0 then uniconify
'isarealist'
if rc=0 then do
   'requestnotify "Must be called from Message List or Message window"'
   exit
end

'requestresponse TITLE "Sure?" PROMPT "Add all people in current'LF'area to userlist?" GADGETS "Yes|Abort"'
if rc=0 then exit

'getnummsgs'
msgs=result
cmsg=1
added=0

'firstmessage'

'progressopen TITLE "Adding To Userlist" PROMPT "Hold on!"'
prog=result

'adduserlist NOREQ'
if rc=0 then added=1

do until cmsg=msgs
   'nextmessage'
   cmsg=cmsg+1
   'progressupdate' prog cmsg msgs 'PROMPT "'added' people added to userlist"'
   if rc>0 then do
      'progressclose' prog
      exit
   end
   'adduserlist NOREQ'
   if rc=0 then added=added+1
end
'progressclose' prog
