
07.02.2012, 19:24
|
 |
Начинающий
|
|
Регистрация: 24.07.2008
Сообщения: 127
Версия Delphi: Delphi 7
Репутация: 23
|
|
Код:
procedure TForm1.tmr1Timer(Sender: TObject);
var
i: Word;
s,firstznach,secondznach,celayastroka,poi: string;
zaq,zaw: Integer;
xsw: Real;
begin
tmr1.Enabled:=True;
for i:=0 to mmo1.Lines.Count-1
do
if pos('STOPPAGE',mmo1.Lines.Strings[i])>0
then begin
celayastroka:=mmo1.Lines.Strings[i];
firstznach:=Copy(celayastroka,1,3);
secondznach:=Copy(celayastroka,4,3);
zaq:=StrToInt(firstznach);
zaw:=StrToInt(secondznach);
xsw:=(zaq*255)+(zaw/2+1);
poi:=FloatToStr(xsw);
ShowMessage(poi);
if xsw > 0 then
begin
tmr1.Enabled:=False;
end;
end;
end;
|