home *** CD-ROM | disk | FTP | other *** search
- /* AGASSM - OctaMED Player control script */
- /* © 1995 Paul Vernon */
-
- /* This ARexx program uses a couple of commands from the C: directory
- to interact with the user using the asl.library file requester.
- The asl requester returns a string surrounded in "" so these have
- to be stripped for the program to work correctly! */
-
- Port = Show('P','AGASSM')
- If Port = 0 then do
- Exit
- End
-
- /* Look for OctaMEDPlayers ARexx port.
- If it's not there ask where OctaMEDPlayer is */
-
- OPTIONS RESULTS
-
- exists = Show('P','OCTAMEDPLAYER')
- If exists = 0 then do
- ADDRESS COMMAND 'C:RequestFile > T:AGASSM-Temp TITLE "Where is OctaMEDPlayer?" NOICONS'
- succ = Open(file,'T:AGASSM-Temp','r')
- If succ = 0 then do
- Exit
- End
- String = ReadLn(file)
- succ = Close(file)
- ADDRESS COMMAND 'C:Delete T:AGASSM-Temp QUIET'
- If String = '' then do
- Exit
- End
- String = Left(String,Length(String)-1)
- String = Right(String,Length(String)-1)
- ADDRESS COMMAND 'C:Run' String
- End
-
- /* Once OctaMEDPlayer is running, ask for a module to load */
- /* Load the module into OctaMEDPlayer and Play it */
-
- ADDRESS COMMAND 'C:RequestChoice >T:AGASSM-Temp "AGASSM - OctaMED Player" "Do you want to play the current module?" "Yes|Load another|No"'
- succ = Open(file,'T:AGASSM-Temp','r')
- If succ = 0 then do
- Exit
- End
- String = ReadLn(file)
- succ = Close(file)
-
- ADDRESS COMMAND 'C:Delete T:AGASSM-Temp QUIET'
-
- If String = '1' then do
- ADDRESS 'OCTAMEDPLAYER'
- Play
- Exit
- End
- If String = '0' then do
- ADDRESS 'OCTAMEDPLAYER'
- Stop
- Exit
- End
-
- ADDRESS COMMAND 'C:RequestFile > T:AGASSM-Temp TITLE "AGASSM - Select a module" POSITIVE "Load" NEGATIVE "Quit" NOICONS'
-
- succ = Open(file,'T:AGASSM-Temp','r')
- If succ = 0 then do
- Exit
- End
- String = ReadLn(file)
- succ = Close(file)
-
- ADDRESS COMMAND 'C:Delete T:AGASSM-Temp QUIET'
-
- If String = '' then do
- ADDRESS 'OCTAMEDPLAYER'
- Stop
- ADDRESS COMMAND 'C:RequestChoice > T:AGASSM-Temp "AGASSM - Quit OctaMEDPlayer" "Do you want to quit?" "OK|CANCEL"'
- succ = Open(file,'T:AGASSM-Temp','r')
- If succ= 0 then do
- Exit
- End
- String = ReadLn(file)
- succ = Close(file)
- ADDRESS COMMAND 'C:Delete T:AGASSM-Temp QUIET'
- If String = '0' then do
- Exit
- End
- ADDRESS 'OCTAMEDPLAYER'
- Quit
- Exit
- End
-
- ADDRESS 'OCTAMEDPLAYER'
-
- String=Left(String,Length(String)-1)
- String=Right(String,Length(String)-1)
-
- LoadMod String
- Play
-
- Exit
-