home *** CD-ROM | disk | FTP | other *** search
/ The AGA Experience 2 / agavol2.iso / software / diskmags / scripts&guides / startrek / trx / mv.rexx < prev    next >
OS/2 REXX Batch file  |  1995-09-25  |  2KB  |  67 lines

  1. /*  MARK, UNMARK, VIEW & WIPE SCRIPT FOR TREK-THE GUIDE v1.5
  2. **  Still needs lots of work though!! */
  3.  
  4. if ~show('L','rexxarplib.library') then
  5.     call addlib('rexxarplib.library',0,-30)
  6.  
  7. arg title func .
  8.  
  9. if func = "MARK" then do
  10.         open(tag, 'env:trekguide/'title, 'w')
  11.     close(tag)
  12.     result = PostMsg(180, 200,title'\IS NOW MARKED', TREKGUIDE)
  13.     call delay(30)
  14.     result = PostMsg() /* this closes the message requester */
  15.     end
  16.  
  17. if title = "VIEW" then do
  18.     eplist = FileList('ENV:TREKGUIDE/*', files, , N)
  19.         if eplist = 0 then do
  20.         envfiles = Request(180, 250, 'There are no marked files to view.\Try marking a file first.', , OKAY, ,TREKGUIDE)
  21.         exit
  22.         end
  23.  
  24.     pick = requestlist(1, files.0, files, 225, 250, 250, 100, TREKGUIDE, sort)
  25.     address amigaguide.1 link pick
  26.     /* address showguide.1 LINK 'TG-ORIG/THE_NAKED_TIME */
  27.     end
  28.  
  29. if title = "CLEAR" then do   /* THIS IS THE WIPE COMMAND */
  30.  
  31.     eplist = FileList('ENV:TREKGUIDE/*', files, , N)
  32.  
  33.         if eplist ~= 0 then do
  34.         envfiles = Request(180, 250, 'Do you really want to\DELETE your marked files?', , YES,NO,TREKGUIDE)
  35.         end
  36.         if envfiles = '' then do
  37.         exit
  38.         end
  39.  
  40.         if eplist = 0 then do
  41.         envfiles = Request(180, 250, 'You have no marked files to delete.', , OKAY,,TREKGUIDE)
  42.         exit
  43.         end
  44.  
  45.     address command 'c:delete env:TrekGuide all'
  46.         address command 'c:delete envarc:TrekGuide all'
  47.  
  48.     call delay(30)
  49.     address command 'c:makedir env:TrekGuide'
  50.     exit
  51.     end
  52.  
  53. if func = "UNMARK" then do
  54.  
  55.     eplist = FileList('ENV:TREKGUIDE/'title, files, , N)
  56.         if eplist = 0 then do
  57.         envfiles = Request(180, 250, 'THIS EPISODE IS NOT MARKED.', , OKAY,,TREKGUIDE)
  58.         exit
  59.         end
  60.  
  61.         address command 'c:delete env:trekguide/'title
  62.     result = PostMsg(180, 200,title'\IS NOW UN-MARKED', TREKGUIDE)
  63.     call delay(40)
  64.     result = PostMsg() /* this closes the message requester */
  65.     exit
  66.     end
  67.