home *** CD-ROM | disk | FTP | other *** search
- /*
- REXX LHA-Player by Erno Tuomainen
-
- Version 0.2, first release
-
- This script is meant to be used with MultiPlayer 1.30!
-
- What's the idea of this script?
-
- Well, in my BBS there's hundreds of NICE modules (archived
- with LHA), which I like to listen... often! And therefore I
- had (Allways!) to decompress the file before I could listen
- the module in it. Well, NOT ANYMORE!
-
- This script automates this! It extracts the file you want and
- searches for any MOD.* or *.MOD files in it and passes the
- FIRST founded module to MultiPlayer via AREXX-port. Enough
- for me.
-
- At the moment there is only one archiver type supported, but
- that's enough for me 'coz in my bbs system THERE is NO other
- types of archivers than LHA. (Atleast not in my MODULE areas)
-
- This is very limited for now, there's no error handling
- routines or other nice 'legal' (?) mumbojumbo. It works for
- me! (Have I said it before :)
-
- This version was released only because some of my friends
- wanted it. I take NO responsibility of anything, lose of
- valuable data (it should not happen with REXX and this kind of
- program!) or anything! YOU use this in your VERY OWN
- RESPONSIBILITY!
-
- Installation:
-
- Edit variables: Archiver, Moduledir and Mpath (below in this
- file) ~~~~~~~~ ~~~~~~~~~ ~~~~~
-
- Copy this LHAPLAY.REXX file into your REXX:-directory and the
- 'PLAY'-dos script into f.ex S:-directory or some other
- directory in your search path. (Script flag is set but if for
- some reason it isn't, you can set it by yourself with command
- 'PROTECT S:PLAY +S'. So you can use it without the EXECUTE
- command (OS2.x)).
-
- So there it is, shouldn't be a problem. Now you can play your
- archived modules by just typing :
-
- 'PLAY Moongazer' or (see no extension needed :)
- 'PLAY Moonga*' or
- 'PLAY Moongazer.LHA' or
- 'PLAY Moongazer.LZH' etc.. try yourself
-
- Author:
-
- You can reach me from my very own BBS, called 'Moonlight
- Sonata DLG' and as you can quess from the name it's running on
- Dialog Pro BB/OS (BEAST, BEST! Yeah!) and I'm a music lover,
- composer (module/midi etc.)
-
- Number: +358-18-161862 - Open 17:00 - 09:00 GMT+2
- Running with A3000-25 with 225MB of HardDrives and HST DS.
-
- You can write messages through Fido-Net too -> 2:221/112
-
- DO NOT MODIFY THIS FILE BEFORE SPREADING! YOU CAN SPREAD THIS
- ONLY IN IT'S ORIGINAL FORM! BUT YOU CAN MODIFY THIS FOR YOUR
- OWN USE!
-
- */
- /* Configure these lines as your system requires */
- Archiver = 'LHA x' /* Archive extracting command, may include path */
- Moduledir = 'MOD:' /* This is where your modules are kept */
- /* Configure as you like */
- MPath = 'Work:Miscutils/' /* Path for Multiplayer executable 'Player' */
-
- LF = '0A'x
- C_RED = '1B 5B 33 31 6D'x
- C_GREEN = '1B 5B 33 32 6D'x
- C_BLUE = '1B 5B 33 34 6D'x
- C_CYAN = '1B 5B 33 36 6D'x
- C_VIOL = '1B 5B 33 35 6D'x
- C_RESET = '1B 5B 30 6D'x
- C_BACKR = '1B 5B 33 30 6D'x
-
-
- ADDRESS COMMAND
- OPTIONS RESULTS
- Trace
-
- ARG file
-
- if ~show('p',"RXTRACKER") then
- MPath'player'
-
- if ~show('L',"rexxsupport.library") then do
-
- if addlib('rexxsupport.library',0,-30,0) then
- say "Added Rexxsupport.library."
-
- else do
- say "Rexxsupport.library not available, exiting..."
- exit 10
- end
-
- end
-
- say C_RED 'RexxTracker for MultiPlayer by Erno Tuomainen' LF
- say C_GREEN 'Please Wait... Scanning and DeCrunching File 'C_RESET''file''C_GREEN'...' LF C_RESET
-
- if ~exists('t:rxplay') then
- 'makedir t:rxplay'
-
- 'LHA -m -q x 'moduledir''file' t:rxplay/'
-
- dirri=showdir('t:rxplay','f','@')
- dirri=insert(dirri,'@')
- dirri2=upper(dirri)
-
- if pos('MOD.',dirri2)=0 then do
- position=index(dirri2,'.MOD')
- position3=lastpos('@',dirri2,position)
- position2=index(dirri2,'.MOD',position)
- filenam=substr(dirri2,position3+1,(position2-position3)+3)
-
- END
-
- else do
- position=pos('MOD.',dirri2)
- position2=pos('@',dirri2,position)
- filenam=substr(dirri2,position,position2-position)
- END
-
- filename=left(filenam,length(filenam))
- filename=insert(filename,'22'x)
- filename=insert('T:RxPlay/',filename)
- filename=insert('22'x,filename)
-
- Say C_RED 'Now Playing 'C_RESET''filename''C_RED'....'
-
- ADDRESS RXTRACKER
- 'PLAY 'filename
-
- ADDRESS COMMAND
- 'delete >NIL: t:rxplay/*.*'
-
- EXIT
-