home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Amiga / Internet / Mail / iris.lha / Iris / StoreMsg.irx < prev   
Text File  |  1998-04-04  |  1KB  |  76 lines

  1. /* REXX script to transfer message(s) to the Store folder */
  2. /* $VER: StoreMsg.irx V1.1 (supplied with Iris V1.3)      */
  3.  
  4. address IRIS
  5.  
  6. options results
  7. options failat 11
  8.  
  9. 'LOCKGUI'
  10.  
  11. signal on break_c
  12.  
  13. 'GETNUMSELECTED'
  14. n = result
  15. if rc > 0 then do
  16.     'ASKCHOICE "Store message(s)" "This script needs at*Nleast V1.3 of Iris." "**_OK"'
  17.     signal break_c
  18. end
  19. else nop
  20. if n = 0 then do
  21.     'ASKCHOICE "Store message(s)" "Select at least one*Nmessage first!" "**_OK"'
  22.     signal break_c
  23. end
  24. else nop
  25.  
  26. dest = "Store"
  27.  
  28. 'GETFOLDER'
  29.  
  30. if result = dest then do
  31.     'ASKCHOICE "Store message(s)" "Impossible action:*NSame folder selected!" "**_OK"'
  32.     signal break_c
  33. end
  34. else nop
  35.  
  36. i = 0
  37. err = ''
  38. 'GETNUMSELECTED'
  39. n = result
  40. if rc > 0 then do
  41.     'ASKCHOICE "Store message(s)" "This script needs at*Nleast V1.3 of Iris." "**_OK"'
  42.     signal break_c
  43. end
  44. else nop
  45. if n = 0 then do
  46.     'ASKCHOICE "Store message(s)" "Did you click on the listview???" "**_OK"'
  47. end
  48. else nop
  49. do i=0 to n-1
  50.     'MESSAGEFILE' i
  51.     msg = result
  52.     if rc > 0 then do
  53.         err = 'Did you click on the listview???'
  54.         leave i
  55.     end
  56.     else nop
  57.     'READMESSAGE "'||msg||'" 0 TO "'||dest||'"'
  58.     if rc > 0 then do
  59.         err = 'The READMESSAGE command failed.'
  60.         leave i
  61.     end
  62.     else nop
  63. end
  64. if err ~= '' then do
  65.     'ASKCHOICE "Store message(s)" "'||err||'" "**_OK"'
  66. end
  67. else do
  68.     'DELETE'
  69. end
  70. signal break_c
  71. exit
  72.  
  73. break_c:
  74. 'UNLOCKGUI'
  75. exit
  76.