home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / new / comm / fido / spot / rexx / optimize.spot < prev    next >
Text File  |  1993-12-21  |  1KB  |  43 lines

  1. /***************************************************************************/
  2. /* Optimize.rexx   ©1993 Stu Churchill   2:250/107.97@fidonet              */
  3. /*                                                                         */
  4. /* $VER: Optimize.rexx 1.50 (17.9.93)                                      */
  5. /*                                                                         */
  6. /* Call this script from your cron every morning to perform a daily        */
  7. /* optimization of your messagebase                                        */
  8. /***************************************************************************/
  9.  
  10. options results
  11.  
  12. spot_path = 'Workbench:WBStartup/Spot CONFIGPATH "MAIL:Configs/Spot/"'
  13.  
  14. if ~show('ports','SPOT') then do
  15.   address command 'run 'spot_path
  16.   'WaitForPort SPOT'
  17.   quit = yes                  /* Marker to close SPOT after finishing */
  18. end
  19.  
  20. address 'SPOT'
  21. 'isiconified'
  22. if rc = 0 then do
  23.   icon = yes                  /* Marker to re-iconify after finishing */
  24.   'uniconify'
  25. end
  26. 'spot2front'
  27. 'isarealist'
  28. if rc = 5 then do
  29.   'arealist'
  30. end
  31. 'purgebuffers'                /* Free up as much memory as possible */
  32. 'optimize NOREQ CLOSEWIN'     /* Perform optimization */
  33.  
  34. if quit = yes then do
  35.   'quitspot NOREQ'            /* Close SPOT if we had to open it ourselves */
  36.   exit
  37. end
  38. if icon = yes then do
  39.   'iconify NOREQ'             /* Re-iconify if necessary */
  40. end
  41.  
  42. exit
  43.