Probier mal das hier !
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29:
| RS232Active : Boolean; tempBuffer : String; RS232Active := False; procedure TForm1.Timer1Timer(Sender: TObject); begin RS232Active := False; with TStringList.Create do try Text := tempBuffer; SaveToFile('c:\test.txt'); finally Free; end; tempBuffer := ''; end;
procedure TForm1.ApdComPort1TriggerAvail(CP: TObject; Count: Word); var I : Word; begin RS232Active := True; Timer1.enabled := False; Timer1.enabled := True; for I := 1 to Count do tempBuffer := tempBuffer + ApdComPort1.GetChar; end; |
_________________
Man sollte keine Dummheit zweimal begehen, die Auswahl ist schließlich groß genug.