home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2005 June / PCpro_2005_06.ISO / files / opensource / amc / amc_install.exe / {app} / Scripts / Debug.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2005-01-02  |  597 b   |  32 lines

  1. unit Debug;
  2.  
  3. const
  4.   SourcePath = 't:\01\';
  5.  
  6. function GetLocalPage(Address: string): string;
  7. var
  8.   Page: TStringList;
  9.   FileName: string;
  10. begin
  11.   Page := TStringList.Create;
  12.   FileName := '';
  13.   Input('', 'File to read:', FileName);
  14.   Page.LoadFromFile(SourcePath + FileName + '.html');
  15.   Result := Page.Text;
  16.   Page.Free;
  17. end;
  18.  
  19. function SavePage(Address: string; FileName: string): string;
  20. var
  21.   Page: TStringList;
  22. begin
  23.   Page := TStringList.Create;
  24.   Page.Text := GetPage(Address);
  25.   Page.SaveToFile(FileName);
  26.   Result := Page.Text;
  27.   Page.Free;
  28. end;
  29.  
  30. begin
  31. end.
  32.