Function "ZIP"

delphi package - automated exception handling
Post Reply
neji
Posts: 155
Joined: Wed Mar 09, 2005 11:39 am
Contact:

Function "ZIP"

Post by neji »

in this unit is a function called ZIP to put some files into a zip archive. If the files have a certain size, a small progress dialog (it comes from the "send bug report") pops up. This dialog is quite nice, but the dialogs caption always says "sending bug report". Is there a possibility to change this caption or wasn't this function ment to be used outside of the "send bug report" section?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

There's a function named "Zip" in "madZip.pas", and this function does not show any progress bars. In "madExcept.pas" there's no function named "Zip". So I'm not sure exactly what you mean. Which function do you want to call outside of "send bug report"?
neji
Posts: 155
Joined: Wed Mar 09, 2005 11:39 am
Contact:

Post by neji »

I wanted to write a little application, that zips one or more files and sends it via email using the sendmapimail function. it seems that the progressdialog comes, when SendMapiMail is called.

heres my code :

Code: Select all

  xAttachments := NewAttachments;
  for iloop := 1 to ParamCount do
    if ParamCount = 1 then filename := ChangeFileExt(ExtractFileName(ParamStr(iloop)),'.zip')
      else begin
        if ExtractFilePath(ParamStr(iloop)) = '' then
        begin
          filename := IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0)));
          filename := ExtractFileName(copy(filename,1,Length(filename) - 1) + '.zip');
          Break;
        end;
        filename := IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(iloop)));
        filename := ExtractFileName(copy(filename,1,Length(filename) - 1) + '.zip');
      end;
  for iloop := 1 to ParamCount do
    if FileExists(ParamStr(iloop)) then
    begin
      SetLength(arrFiles,Length(arrFiles) + 1);
      arrFiles[iloop - 1] := ParamStr(iloop);
      xAttachments.Add(ParamStr(iLoop),
                       ExtractFileName(ParamStr(iLoop)),
                       filename);
    end;

  GetTempPath(MAX_PATH,arrCh); sTempDir := IncludeTrailingPathDelimiter(StrPas(arrCh));
  Zip(sTempDir + filename,arrFiles);

  SendMapiMail('','','',xAttachments);

  FreeAndNil(xAttachments);

madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Ah, ok, just change MESettings.SendBoxTitle.

http://help.madshi.net/MESettings.htm#I ... ndBoxTitle
neji
Posts: 155
Joined: Wed Mar 09, 2005 11:39 am
Contact:

Post by neji »

Ah thanks a lot
Post Reply