ExportArticle1Click method

Applies to
TForm2

Declaration
procedure ExportArticle1Click(Sender: TObject);

Implementation

procedure TForm2.ExportArticle1Click(Sender: TObject);
var fname,bn:String; p:Integer;
begin try
if Sender<>nil then play_snd(1);
setCurrentDir(my_wiki_dir);
expt.InitialDir := my_wiki_dir;
if Trim(FlatComboBox1.Text)='' then bn:='untitled' else bn:=FlatComboBox1.Text;
if not FileExists(Trim(bn)+'.mht') then fname:= Trim(bn)+'.mht'
 else begin
   for p:=1 to 255 do begin
    if not fileexists(Trim(bn)+Inttostr(p)+'.mht') then begin
      fname:=Trim(bn)+Inttostr(p)+'.mht';
      break;
   end;
 end;
end;
expt.FileName:= fname;
if expt.Execute then begin
form13:=TForm13.Create(self);
form13.Show;
form13.Refresh;
 case notebook1.PageIndex of
  0 : SaveToMHT(wikipedia_console.LocationURL,expt.filename);
  2 : SaveToMHT(wikimedia_console.LocationURL,expt.filename);
  3 : SaveToMHT(wikidict_console.LocationURL,expt.filename);
  5 : SaveToMHT(wikibooks_console.LocationURL,expt.filename);
  6 : SaveToMHT(wikinews_console.LocationURL,expt.filename);
  7 : SaveToMHT(Wikiquote_console.LocationURL,expt.filename);
  8 : SaveToMHT(wikisource_console.LocationURL,expt.filename);
  9 : SaveToMHT(wikispices_console.LocationURL,expt.filename);
 end;
freeandnil(form13);
end;
except
on E : Exception do begin
   freeandnil(form13);
   _log_entry_error(E.ClassName,E.Message,'E60000');
end;
end;End;


HTML generated by Time2HELP
http://www.time2help.com