View Single Post
  #245  
Old 10-05-2023, 22:09
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@BLACKFIRE. Hello. FMemo does not work as I would like. Everything is fine, except that when a new archive starts, there is an empty line after Unpacking. I will provide part of the code below.
What am I doing wrong? It will be useful to many, I think.
Code:
function ProgressCallback(OverallPct, CurrentPct, DiskTotalMB, DiskExtractedMB: integer; DiskName, CurrentFile, TimeStr1, TimeStr2, TimeStr3, Speed: WideString): longword;
var
 S: WideString;
begin
  S:= 'Unpacking: ' + CurrentFile;
  if Page2Memo.LineStrings(Page2Memo.LineCount - 1) <> S then
  begin
    Page2Memo.AddLine(S);
  end;
  Result:= ISArcExCancel;
end;

have you tried this?


Code:
function ProgressCallback(OverallPct, CurrentPct, DiskTotalMB, DiskExtractedMB: integer; DiskName, CurrentFile, TimeStr1, TimeStr2, TimeStr3, Speed: WideString): longword;
var
 S: WideString;
begin
  S:= 'Unpacking: ' + CurrentFile;
  if (length(CurrentFile) > 0) and (Page2Memo.LineStrings(Page2Memo.LineCount - 1) <> S) then
  begin
    Page2Memo.AddLine(S);
  end;
  Result:= ISArcExCancel;
end;
Reply With Quote
The Following User Says Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (22-06-2023)