Program Pager;
Uses crt,dos,ddplus,ddscott;
var
  pagestr             : string;
  whichsong,whichicon : char;
  txt,callnext        : text;

begin
  InitDoorDriver('pager.ctl');
  progname:='Sysop wave pager v04-01.4a r1';
  if exist('copyrigh.ans') then displayfile('copyrigh.ans');
  swriteln('');
  swriteln('Press any key to continue');
  repeat until skeypressed;

  sclrscr;
  if exist('main.ans') then displayfile('main.ans');
  swriteln('What is the reason for the chat:');
  prompt(pagestr,50,true);


  swriteln('');swriteln('');
  swriteln('Page the sysop with what song/wave file: ');
  swriteln('---------------------------------------');
  swriteln(' A: Paging bluewolf.. Hey, I want to talk!!');
  swriteln(' B: I am bored and would like to chat!!');
  swriteln(' C: DUDE!!!! DUDE!!!! DUDE!!!');
  swriteln('');
    swrite('Your Choice: ');
  sread_char(whichsong);


  assign(callnext,'exestuff.bat');
   rewrite(callnext);
   writeln(callnext,'@echo off');
   writeln(callnext,'run.exe '+whichsong+'.wav');
   writeln(callnext,'exit');
  close(callnext);

  swriteln('');  swriteln('');
  swriteln('Sysop is being paged.');
  swriteln('Press anykey to exit');
  repeat until skeypressed;

end.
