home *** CD-ROM | disk | FTP | other *** search
- /* Play.rexx */
-
- options results; address MrMIDI
-
- MUIA_Disabled = 0x80423661; MUIA_Selected = 0x8042654b
- MUIA_List_Entries = 0x80421654; MUIA_List_Active = 0x8042391c
- MUIA_NoNotify = 0x804237f9; MUIA_Slider_Level = 0x8042ae3a
- MUIV_List_Active_Down = -5; MUIV_List_Active_Top = -2
-
- getvar stopped
- if result = 1 then return
- check ID PLAY; playing = result
- if playing = 1 then do
- do forever
- check ID PLAY ATTRS MUIA_Disabled 1
- setvar cont 0
- list ID SLIST ATTRS MUIA_List_Entries
- if result = 0 then call Eject.rexx
- call PlayMain()
- getvar cont
- if result = 1 then iterate
- check ID PLAY; playing = result
- cycle ID REPT; repeat = result
- if playing = 1 & repeat == 'Repeat All' then do
- list ID SLIST ATTRS MUIA_List_Entries; max = result
- if max = 0 then leave
- list ID SLIST ATTRS MUIA_List_Active; current = result
- list ID SLIST POS current; parse var result filename','dummy
- getvar current_song; temp_song = result
- if filename = temp_song & max ~= 1 then do
- check ID RAND; rnd = result
- if rnd = 1 then do
- flag = 0
- do while flag = 0
- temp = random(0, max - 1, time('S'))
- if temp ~= current then do
- list ID SLIST ATTRS MUIA_List_Active temp
- flag = 1
- end
- end /* of while flag */
- end /* of if rnd */
- else if current ~= max - 1 then list ID SLIST ATTRS MUIA_List_Active MUIV_List_Active_Down
- else list ID SLIST ATTRS MUIA_List_Active MUIV_List_Active_Top
- end /* of if filename */
- else do /* current song ~= selected song */
- /* slider ID PROG ATTRS MUIA_Slider_Level 0
- setvar current_time '00:00'
- text ID CURNT LABEL "\033b\033r00:00" */
- end
- iterate
- end /* of repeat all */
- else if playing = 1 & repeat == 'Repeat 1' then do
- /* slider ID PROG ATTRS MUIA_Slider_Level 0
- setvar current_time '00:00'
- text ID CURNT LABEL "\033b\033r00:00" */
- iterate
- end /* of repeat 1 */
- else if playing = 1 then do /* no repeat */
- list ID SLIST ATTRS MUIA_List_Entries; max = result
- if max = 0 then leave
- list ID SLIST ATTRS MUIA_List_Active; current = result
- list ID SLIST POS current; parse var result filename','dummy
- getvar current_song; temp_song = result
- if filename = temp_song & max ~= 1 then do
- check ID RAND; rnd = result
- if rnd = 1 then do
- flag = 0
- do while flag = 0
- temp = random(0, max - 1, time('S'))
- if temp ~= current then do
- list ID SLIST ATTRS MUIA_List_Active temp
- flag = 1
- end
- end /* of while flag */
- end /* of if rnd */
- else if current ~= max - 1 then list ID SLIST ATTRS MUIA_List_Active MUIV_List_Active_Down
- else leave
- end /* of if filename */
- else if max = 1 then leave
- else do /* current song ~= selected song */
- /* slider ID PROG ATTRS MUIA_Slider_Level 0
- setvar current_time '00:00'
- text ID CURNT LABEL "\033b\033r00:00" */
- end
- iterate
- end /* of no repeat */
- else leave
- end /* of do forever */
- end /* of if playing */
- check ID PLAY ATTRS MUIA_Selected 0 MUIA_NoNotify 1
- call setclip('MrMIDI_FLAG', 1)
- address command 'Kill >NIL: GMPlay'
- setvar stopped 0
- text ID PROG LABEL "Stopped."
- return
-