Villeicht funktioniert dann das hier auch
Delphi-Quellcode:
procedure TForm1.ApdComPort1TriggerAvail(CP: TObject; Count: Word);
{Event OnTriggerAvail - Example how OnTriggerAvail works}
var
I : Word;
C : Char;
S : String;
List: TStringList;
begin
List:=TStringList.Create;
List.LoadFromFile(ExtractFilePath(ParamStr(0))+ 'temp.txt');
S := '';
for I := 1 to Count do begin
C := ApdComPort1.GetChar;
case C of
#0..#31 : {Don't display} ;
else S := S + C;
end;
end;
List.add(s);
List.SaveToFile(ExtractFilePath(ParamStr(0))+ 'temp.txt');
List.Free;
end;
oder
Delphi-Quellcode:
procedure TForm1.ApdComPort1TriggerAvail(CP: TObject; Count: Word);
{Event OnTriggerAvail - Example how OnTriggerAvail works}
var
I : Word;
C : Char;
S : String;
List: TStringList;
begin
List:=TStringList.Create;
List.LoadFromFile(ExtractFilePath(ParamStr(0))+ 'temp.txt');
S := '';
for I := 1 to Count do begin
C := ApdComPort1.GetChar;
case C of
#0..#31 : {Don't display} ;
else S := S + C;
end;
end;
List.Text:=List.Text+S;
List.SaveToFile(ExtractFilePath(ParamStr(0))+ 'temp.txt');
List.Free;
end;
Gruß Uwe