home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1998 #5
/
AmigaPlus_CD-ROM_Nr.5-98.iso
/
pd
/
musik
/
mrmpeg
/
delete.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-03-06
|
2KB
|
62 lines
/* Delete.rexx */
options results; address MrMPEG; signal on syntax
MUIA_List_Active = 0x8042391c; MUIA_List_Entries = 0x80421654
MUIA_Slider_Level = 0x8042ae3a; MUIA_Window_Sleep = 0x8042e7db
MUIM_List_Remove = 0x8042647e; MUIV_List_Remove_Selected = -3
window ID WIND1 ATTRS MUIA_Window_Sleep 1
window ID WIND2 ATTRS MUIA_Window_Sleep 1
need_to_stop = 1
getvar current_song; playing_name = result
list ID SLIST ATTRS MUIA_List_Entries; entries = result
if entries = 0 then do
window ID WIND2 ATTRS MUIA_Window_Sleep 0
window ID WIND1 ATTRS MUIA_Window_Sleep 0
return
end
method ID SLIST MUIM_List_Remove MUIV_List_Remove_Selected
/* list ID SLIST REMOVE POS MUIV_List_Remove_Selected */
list ID SLIST ATTRS MUIA_List_Active
if result = 4294967295 then list ID SLIST ATTRS MUIA_List_Active 0
list ID SLIST ATTRS MUIA_List_Entries; temp_max = result
setvar max temp_max
text ID MAX LABEL "\033b\033r"right(temp_max, 3)
temp_total_time = 0
do i = 0 to temp_max - 1
list ID SLIST POS i
parse var result temp_name','temp_song_time','dummy
temp_total_time = temp_total_time + left(temp_song_time, 2) * 60 + right(temp_song_time, 2)
if temp_name = playing_name then do
need_to_stop = 0
list ID SLIST ATTRS MUIA_List_Active i
setvar active i
text ID ACTIV LABEL "\033b\033r"right(i + 1, 3)
end
end
temp_string = right(temp_total_time % 3600, 2, 0)||":"||,
right(temp_total_time // 3600 % 60, 2, 0)":"right(temp_total_time // 60, 2, 0)
setvar total_time temp_string
text ID TOTAL LABEL "\033b\033r"temp_string
if need_to_stop then do
string ID FNAME CONTENT "No song is loaded."
text ID LCD LABEL "MrMIDI is also available from Aminet."
text ID ACTIV LABEL "\033b\033r 0"
text ID CURNT LABEL "\033b\033r00:00"
check ID PLAY
if result = 1 then call Stop.rexx
else slider ID PROG ATTRS MUIA_Slider_Level 0
end
window ID WIND2 ATTRS MUIA_Window_Sleep 0
window ID WIND1 ATTRS MUIA_Window_Sleep 0
return
syntax:
request ID WARN GADGETS '"OK"' '"\033b\033cError 'RC' in line 'SIGL':\033n\012\033c'errortext(RC)'"'
window ID WIND2 ATTRS MUIA_Window_Sleep 0
window ID WIND1 ATTRS MUIA_Window_Sleep 0
return