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; var ttySLeser: tLeseProzess; s: string; begin ttySLeser:=tLeseProzess.create(extractfilepath(paramstr(0))+'socket',1); repeat if ttySLeser.gibZeile(s) then begin if s='Ha!' then continue; // Startzeichen if length(s)=2 then if base64ToBin(s) then begin writeln('Bits: '+s); continue; end; writeln('Warnung: Kenne Kommando '''+s+''' nicht!'); end else sleep(100); until false; ttySLeser.free; end.