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, gitupdateunit; var irDecoder: tIRDecoder; inputDatei: string; cnt: longint; watte,debug: boolean; begin inputDatei:=''; watte:=false; debug:=false; for cnt:=1 to paramcount do begin if paramstr(cnt)='-W' then begin watte:=true; continue; end; if paramstr(cnt)='-D' then begin debug:=true; continue; end; if inputDatei<>'' then raise exception.create('Mehr als eine inputDatei angegeben!'); inputDatei:=paramstr(cnt); end; if inputDatei='' then raise exception.create('Keine inputDatei angegeben!'); irDecoder:=tIRDecoder.create(inputDatei,extractfilepath(paramstr(0))+'befehle.konf',watte,debug); repeat repeat while irDecoder.zeileVerarbeitet do; until not irDecoder.befehlVerarbeitet; sleep(100); until false; irDecoder.free; end.