home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #3
/
amigamamagazinepolishissue1998.iso
/
bazy
/
musicmaniii_inst
/
data
/
arexx
/
importids.mmx
< prev
next >
Wrap
Text File
|
1997-08-25
|
2KB
|
79 lines
/*
* ImportIDs.mmx
*
*
* ©1997 Andreas Mair
*
*
* Version: 1.00
* Date: 29.07.1997
*
* Function: Import the "ID#?"-files created by various CD-player-programs
* (e.g. "MultiCDPlayer" or "Skandalfo's CD Player") in MusicManIII.
*
* Requirements: MusicManIII V3.06 (or above)
* ARexx running
* a directory with your "ID#?"-files
*
* Usage: - first start MusicManIII and load the CD-file where you want to import
* (of course you can also create a new CD-file)
* - then go to a CLI (or Shell)
* - start this script with the path to your "ID#?"-files
* (e.g. "rx ImportIDs.mmx Work:disks")
* - wait until the script ends
* - take a look at your imported CDs:
* -> you'll have to "Read in" the song's length of each CD
* (use CD-Player or the song's popup menu)
* -> you may want to delete all non-audio CDs
* - have fun ;-)
*/
PARSE ARG pathname
IF pathname="" THEN DO
SAY 'Usage: ImportIDs.mmx <path to your "ID#?"-files>'
EXIT
END
IF ~SHOW( 'L', "rexxsupport.library" ) THEN DO
IF ~ADDLIB( "rexxsupport.library", 0, -30, 0 ) THEN DO
SAY "Can't open 'rexxsupport.library'"
EXIT
END
END
ADDRESS "MUSICMAN"
filename=SHOWDIR( pathname, 'f' )
IF (RIGHT( pathname, 1 ) ~= '/') & (RIGHT( pathname, 1 ) ~= ':') THEN
pathname=pathname"/"
SAY pathname
i =1
currentID=SUBWORD( filename, i, 1 )
DO WHILE currentID ~= ""
SAY "Working on " currentID "..."
IF OPEN( FH, pathname""currentID, 'READ' ) THEN DO
artist=READLN( FH )
title =READLN( FH )
'RECORD NEW ARTIST="'artist'" TITLE="'title'"'
song=READLN( FH )
DO WHILE song ~= ""
'SONG APPEND NAME="'song'"'
song=READLN( FH )
END
temp=CLOSE( FH )
END
i=i+1
currentID=SUBWORD( filename, i, 1 )
END