Einzelnen Beitrag anzeigen

Benutzerbild von Spezi1980
Spezi1980

Registriert seit: 11. Aug 2003
Ort: Dresden OT Cossebaude
71 Beiträge
 
Delphi 2005 Personal
 
#4

Re: IF ..... AND -> Wie schließen?

  Alt 11. Feb 2004, 16:21
sollte es so aussehen?

Delphi-Quellcode:
If Label1.Caption='xxxxxxxAND Fileexists('C:\xxxxxxx') THEN
begin
    with AbCabExtractor1 do
    begin
      FileName := ExtractFilePath(paramstr(0))+'xxx.cab';
      BaseDirectory := 'c:\xxx';
      try
        ExtractFiles('xxxxx');
        Progressbar1.StepIt;
      finally
      end;
    end;

    with AbUnzipper1 do
    begin
      FileName := 'c:\xxxxxxx';
      BaseDirectory := ABCabExtractor1.BaseDirectory;
      ABUnzipper1.Password:='xx';
      ExtractFiles( 'xxxx' );
      Progressbar1.StepIt;
    end;
    RenameFile('C:\xxxx','C:\xxxx.xxx');
    Progressbar1.StepIt;
    ShellExecute(0, nil, PChar('c:\xxxx.xxx'), nil, nil, sw_Show);
    Progressbar1.StepIt;
    Progressbar1.Visible:=False;
    ABUnzipper1.CloseArchive;
    DeleteFile('xxxxxxxxx');

end ELSE begin
    with AbCabExtractor1 do
    begin
      FileName := ExtractFilePath(paramstr(0))+'xxx';
      BaseDirectory := 'xxxx';
      try
        ExtractFiles('xxxxx');
        Progressbar1.StepIt;
      finally
      end;
    end;

    with AbUnzipper1 do
    begin
      FileName := 'c:\xxxxxx';
      BaseDirectory := ABCabExtractor1.BaseDirectory;
      ABUnzipper1.Password:='xx';
      ExtractFiles( 'xxxx' );
      Progressbar1.StepIt;
    end;
    
    RenameFile('C:\xxx','C:\xxxxx.xxx');
    Progressbar1.StepIt;
    ShellExecute(0, nil, PChar('c:\xxxx'), nil, nil, sw_Show);
    Progressbar1.StepIt;
    Progressbar1.Visible:=False;
    ABUnzipper1.CloseArchive;
    DeleteFile('xxxxx');
end;
ordne die den code so ann, dass du auf einen Blick siehst, welches Begin zu welchem end gehört.

Gruß Robert

[Edit]da war wohl jemand schneller... [/Edit]
Robert
Codito, ergo sum.
>>I code, therefore I am<<
  Mit Zitat antworten Zitat