home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Meeting Pearls 3
/
Meeting_Pearls_III.iso
/
Index
/
Scripts
/
Hotlist.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-09-17
|
3KB
|
94 lines
/*
* $VER: Hotlist 0.1 (16.9.95)
* © by Andreas Horneffer
* Erstellen einer Hotlist fuer die MP3
*/
/*ED*/
HOTLIST= 's:MP3Hotlist'
TMP= 't:'||pragma('ID')
TMPHL= TMP||'hl'
parse arg Sprache DatID Delete
options results
HOTLIST= HOTLIST||"."||Sprache
DatID=DatID||" "
shell command ':C/pgrep >'||TMP '"'||DatID||'"' ':Index/Guides/bricks/'||Sprache||'-guide-root'
j= lastpos("/",DatID)
DatID2= substr(DatID,j+1)
call open(tmfile, TMP, "r")
newline =readln(tmfile)
call close(tmfile)
newline = "@@"||left(DatID2,26)||'@{"del" SYSTEM "Execute MPCD_S:Index/Scripts/show_prg_hotlist '||Sprache||' '||DatID||' MPCD_S DEL"} '||newline
if open( tmfile, TMPHL , "w") = 0 then do
say 'Dies sollte nicht passieren!'
exit
end
else nop
if open( file, HOTLIST , "r") = 1 then do
do until eof(file)
line= readln(file)
if left(line,2)='@@' then do
if line~=newline then call writeln(tmfile,line)
else do
if delete~="DEL" then do
if Sprache="deutsch" then
address command ':C/AutoReq "-tEintrag schon vorhanden - entfernen?" "-pJa" "-nNein"'
else
address command ':C/AutoReq "-tEntry already there - remove?" "-pYes" "-nNo"'
if RC=0 then newline=""
end
else newline=""
end
end
else nop
end
if newline~="" then call writeln(tmfile,newline)
else nop
call close(file)
end
else call writeln(tmfile,newline)
call close(tmfile)
shell command 'sort FROM 'TMPHL' TO ' TMPHL||'.srt COLSTART=3' /*ED*/
if open( file, TMPHL , "w") = 0 then do
say 'Dies sollte nicht passieren!!'
exit
end
else nop
call writeln(file,copies(' ',28)||"@database MP3" )
call writeln(file,copies(' ',28)||"@node MAIN "||d2c(34)||"Meeting Pearls Hotlist"||d2c(34))
call writeln(file,copies(' ',28)||"")
call writeln(file,copies(' ',28)||"@{B}Meeting Pearls III Hotlist@{UB}")
call writeln(file,copies(' ',28)||"")
if Sprache="deutsch" then do
call writeln(file,copies(' ',28)||'@{"Hilfe " LINK HELP} was sollen die ganzen Knöpfe?')
call writeln(file,copies(' ',28)||'@{"Konfigurieren" LINK CONFIG} Sie, wie sich dieses Dokument auf Knopfdruck verhalten soll.')
end
else do
call writeln(file,copies(' ',28)||'@{"Help " LINK HELP} what are all these buttons for?')
call writeln(file,copies(' ',28)||'@{"Configure" LINK CONFIG} what this document shall do when you press a button.')
end
call writeln(file,copies(' ',28)||"")
call close(file)
shell command 'join ' TMPHL ' ' TMPHL||'.srt TO ' HOTLIST
if open( file, HOTLIST , "a") = 0 then do
say 'Dies sollte nicht passieren!!!'
exit
end
else nop
call writeln(file,copies(' ',28)||"@endnode" )
call close(file)
shell command "delete" TMPHL TMPHL||".srt" TMP