home *** CD-ROM | disk | FTP | other *** search
- {$M $2000,0,0 } { 16K stack, no heap }
- Program play_all_Voc;
-
- uses Dos,crt;
- var
- DirInfo: SearchRec;
- dirlist: array [1..1000] of string[12];
- count,R: Word;
- fname,programname, cmdline,drivepath,ext,progswitch:string[50];
- fi:text;
- reconfigflag:boolean;
- x:integer;
-
- Procedure Reconfigure;
- Begin
- Writeln;
- Writeln(' "Play All!!" Setup');
- Writeln;
- Writeln;
- Writeln('Enter the Drive\path\name of the player');
- Write (' (EX: C:\SOUND\VOX_KIT\VPLAY.EXE ) > ');
- readln(programname);
- writeln;
- Writeln('Enter any command line switches for the player ');
- Write (' (EX: /Q ) > ');
- readln(progswitch);
- writeln;
- Rewrite(fi);
- WriteLn(fi,programname);
- writeln(fi,progswitch);
- Close(fi);
- end;
-
-
- function ok_start:boolean;
- var
- ch:char;
- begin
- if ParamCount>=1 then
- begin
- ok_start:=false;
- cmdline:=paramstr(1);
- ch:=upcase(cmdline[1]);
- if ch='R' then reconfigure
- else writeln('Use PLAYALL R to reconfigure ');
-
- end
- else ok_start:=true;
- {$I-}
- Reset(fi);
- readLn(fi,programname);
- readln(fi,progswitch);
- Close(fi);
- {$I+}
- if (IOResult <> 0) then
- Begin
- Writeln('Error Reading Configuration running setup!!');
- reconfigure;
- end;
- end;
-
-
- begin
- fname:=paramstr(0);
- count:=length(fname);
- delete(fname,count-2,3);
- fname:=fname+'CFG';
- assign(fi,fname);
-
- if ok_start then
- begin
- Writeln(' "Play All!!" Ver 1.0 by Dennis Messer');
- Writeln;
- Writeln('Playing all VOC files in the directory.');
- FindFirst('*.voc', Archive, DirInfo);
- while ((DosError = 0) and (Not keypressed)) do
- begin
- cmdline:=dirinfo.name+' /Q';
- SwapVectors;
- Exec(programname,cmdline);
- SwapVectors;
- FindNext(DirInfo);
- end;
- end;
- End.
-