home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / proasm / rexx / dopus_341 / dopus2ced.dopus < prev    next >
Text File  |  1996-04-29  |  1KB  |  45 lines

  1. /* Load DOpus selected files into the Edge          */
  2. /* this script is for DOpus versions prior than 4.0 */
  3. /* 03.01.94 by Daniel Weber                         */
  4.  
  5. ADDRESS 'dopus_rexx'
  6. OPTIONS RESULTS
  7.  
  8. status 3                /* get #of active window     */
  9. win = result
  10. status 13 win                /* get actual selected drive */
  11. path = result
  12. getselectedfiles '+'
  13. IF RC ~= 0 THEN EXIT(0)
  14. files = result
  15.  
  16.  
  17. DO WHILE files ~=''
  18.   ADDRESS 'EDGE'
  19.   PARSE VAR files txtfile '+' files
  20.  
  21.   getenvvar _ge_errlevel
  22.   errlevel = result
  23.   New
  24.   IF RC == 0 THEN DO
  25.      ADDRESS value result
  26.      open path''txtfile
  27.   END
  28.  
  29.   status 16                /* current size of the active file   */
  30.   FileState = result
  31.   status 18                /* #of changes made to the act. file */
  32.   FileState = FileState + result    /* load it only if no file is loaded */
  33.   IF (FileState ~= 0) THEN DO        /* and no changes are made ...       */
  34.     Open New                /* else open a new view  :)          */
  35.     IF (result = 0) THEN DO
  36.       okay1 "Couldn't open a new view!" /* no more views! max. 10 views */
  37.       EXIT(0)
  38.     END
  39.   END
  40.   Open path''txtfile
  41. END
  42.  
  43. EXIT(0)
  44.  
  45.