program fernbedienung; {$mode objfpc}{$H+} {$DEFINE UseCThreads} uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Classes, lesethreadunit { you can add units after this }, sysutils, lowlevelunit, irdecoderunit; var irDecoder: tIRDecoder; nixZuTun: boolean; begin irDecoder:=tIRDecoder.create(paramstr(1)); repeat nixZuTun:=not irDecoder.zeileVerarbeitet; nixZuTun:=(not irDecoder.befehlVerarbeitet) and nixZuTun; if nixZuTun then sleep(100); until false; irDecoder.free; end.