Advertisement
gh0stless

moduletool.rexx

May 12th, 2018
3,109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rexx 2.01 KB | None | 0 0
  1. /* $VER: ModuleTool.rexx 1.0 (11.05.2018) by gh0stless */
  2. /* Zum Erstellen von Modullisten für Delitracker      */
  3.  
  4. options results
  5.  
  6. SIGNAL ON break_c
  7. SIGNAL ON failure
  8. SIGNAL ON halt
  9. SIGNAL ON ioerr
  10. SIGNAL ON syntax
  11.  
  12. IF ~SHOW('LIBRARIES','rexxreqtools.library') THEN DO
  13.    IF ~ADDLIB('rexxreqtools.library',0,-30) THEN DO
  14.       SAY 'need the <rexxreqtools.library> !!!'
  15.       EXIT(10)
  16.    END
  17. END
  18.  
  19. IF ~SHOW('LIBRARIES','rexxarplib.library') THEN DO
  20.    IF ~ADDLIB('rexxarplib.library',0,-30,0) THEN DO
  21.       SAY 'need the <rexxarplib.library> !!!'
  22.       EXIT(10)
  23.    END
  24. END
  25.  
  26. datei = rtfilerequest('ram:','My Playlist','create a new list:',,,)
  27. IF ~rtresult THEN EXIT(10)
  28. platte = rtfilerequest('DH0:',,'Where are the songs ?','create','rtfi_flags = freqf_nofiles',)
  29. IF ~rtresult THEN EXIT(10)
  30.  
  31. a = open('ausgabe',datei,'W')
  32.  
  33. Summe = 0
  34. Andir = 0
  35. PostMsg(270,60,'ModuleTool 0.1 by gh0stless\'Summe' Module')
  36. b = writeln('ausgabe','MODLIST')
  37. Summe = KATALOG(platte)
  38. a = rtezrequest('In all: 'Summe' Modules','Super!',,,)
  39. a = close ("ausgabe")
  40. TheEnd(0)
  41.  
  42.  
  43. KATALOG:procedure expose Summe Andir
  44. arg path
  45.    Anz_Dirs = filelist(path'#?',DirListe,D,E)
  46.    IF Anz_Dirs >0 THEN DO
  47.     Andir = Andir + Anz_Dirs
  48.     do j = 1 to Anz_Dirs
  49.      Summe=KATALOG(Dirliste.j'/',1)
  50.     end
  51.    END
  52.    Anz_Modu = filelist(path'(#?.mod)',FileListe,F,E)
  53.    IF Anz_Modu = 0 THEN Return Summe
  54.    do a = 1 to Anz_Modu
  55.       b = writeln('ausgabe',FileListe.a)
  56.    end
  57.    Summe = Summe+Anz_Modu
  58.    PostMsg(270,60,'ModuleTool 1.0 by gh0stless\'Summe' Module\in 'Andir' directory(s)')
  59. return Summe
  60.  
  61. /* Normales Ende */
  62.  
  63. TheEnd: procedure
  64.  parse arg ErrCode
  65.  PostMsg()
  66.  
  67.  CALL REMLIB('rexxarplib.library')
  68.  CALL REMLIB('rexxreqtools.library')
  69.  address COMMAND 'avail >NIL: flush'
  70.  
  71.  EXIT(ErrCode)
  72. return
  73.  
  74.  
  75. /* Fehlerbehandlung */
  76.  
  77. break_c:
  78. failure:
  79. halt:
  80. ioerr:
  81. syntax:
  82.  say '+++ Fehler' rc 'in Zeile' sigl '-' ERRORTEXT(rc)
  83.  say SOURCELINE(sigl)
  84.  IF app ~= '00000000'x THEN
  85.     CALL TR_DELETEAPP (app)
  86.  EXIT(10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement