home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / utility / acd221.zip / TEST_ACD.PAS < prev   
Pascal/Delphi Source File  |  1993-05-23  |  2KB  |  62 lines

  1. {$M 16384,0,50000} {NOTE: do NOT use maximum heap!}
  2.  
  3. uses
  4.   Crt, Dos;
  5.  
  6. type
  7.   str66 = string[66];
  8.  
  9. var
  10.   acd_buffer_name: str66;
  11.   x: longint;
  12.   string_address: string[20];
  13.  
  14. procedure call_acd(s1, s2: str66);
  15. begin
  16.  
  17.   acd_buffer_name := 'ACD '+s2;
  18.   x := longint(addr(acd_buffer_name)); str(x, string_address);
  19.  
  20.   exec(fsearch('acd.exe','.;'+getenv('PATH')),'/x'+string_address+' *'+s1);
  21.  
  22.   if (doserror = 0) and (dosexitcode = 0) then
  23.     writeln('CHOSEN path = ',acd_buffer_name)
  24.   else
  25.   if dosexitcode <> 0 then
  26.     writeln('Dos exit code: ',dosexitcode)
  27.   else
  28.     writeln('FAILED');
  29.   writeln;
  30. end;
  31.  
  32. begin
  33.   ClrScr;
  34.   Writeln('We would like to see ALL directories (*), and also show these directories ');
  35.   Writeln('at the top of our screen (/t), with only 10 directories at a time (/w10)');
  36.   writeln('ESC will cause a "FAILED", selection will return a PATH');
  37.   writeln;
  38.   call_acd('*','/w10/t');
  39.  
  40.   writeln;
  41.   writeln('Now we would like to see all directories at the bottom of our screen (/b), ');
  42.   writeln('in reverse colors (/reverse), and with only 6 directories at a time (/w6)');
  43.   writeln;
  44.   call_acd('* /reverse ','/w06/b');
  45.  
  46.   writeln;
  47.   writeln('Now we would like to see only those dirs starting with an "A" (a*),');
  48.   writeln('at the bottom of our screen (/b), in the non-graphical presentation (/g0)');
  49.   writeln('in normal colors, and with only 2 directories at a time (/w2)');
  50.   writeln;
  51.   call_acd('a* /g0','/w02/b');
  52.  
  53.   writeln;
  54.   writeln('Now we would like to see in the non-graphical presentation (/g0) ');
  55.   writeln('all directories in the center of the screen (/c), in reverse colors (/reverse)');
  56.   writeln('and with only 4 directories at a time (/w4)');
  57.   writeln;
  58.   call_acd('* /reverse /g0','/w04/c');
  59.   writeln;
  60.  
  61. end.
  62.