From ce76e557254aaed7d384f0337e5c0b243ac0532d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 22 Oct 2015 12:23:24 +0200 Subject: Option '-W' eingebaut --- fernbedienung.lpr | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/fernbedienung.lpr b/fernbedienung.lpr index df9c45b..e83e7be 100644 --- a/fernbedienung.lpr +++ b/fernbedienung.lpr @@ -13,10 +13,24 @@ uses sysutils, lowlevelunit, irdecoderunit; var - irDecoder: tIRDecoder; + irDecoder: tIRDecoder; + inputDatei: string; + cnt: longint; + watte: boolean; begin - irDecoder:=tIRDecoder.create(paramstr(1)); + inputDatei:=''; + watte:=false; + for cnt:=1 to paramcount do begin + if paramstr(cnt)='-W' then begin + watte:=true; + continue; + end; + if inputDatei<>'' then + raise exception.create('Mehr als eine inputDatei angegeben!'); + inputDatei:=paramstr(1); + end; + irDecoder:=tIRDecoder.create(inputDatei,extractfilepath(paramstr(0))+'befehle.konf',watte); repeat repeat -- cgit v1.2.3-54-g00ecf