Показать сообщение отдельно
Старый 20.07.2010, 13:15   #8
Новичок
 
Регистрация: 19.07.2010
Сообщений: 6
Сказал Спасибо: 3
Имеет 0 спасибок в 0 сообщенях
Bacek пока неопределено
По умолчанию

Всем спасибо за помощь все работает
Вот скрипт если каму то понадобится

Код:
var
TimerCycle:integer;
timer:TTimer;

procedure Init;
begin
timer:=TTimer.Create(nil);
timer.interval:=10;
timer.OnTimer:=@OnTimer;
timer.enabled:=false;
TimerCycle:=1; 
end;

procedure OnTimer(Sender: TObject);
begin 
case TimerCycle of
  1:begin   
  buf:=HStr('A6 3E 84 06 10 00 00 00 00'); //1 пакет
  sendtoserver;
  Inc(TimerCycle);
  timer.interval:=200;  
  end; 
  2:begin  
  buf:=HStr('7B 36 00 A1 C5 01 10');  //2 пакет
  sendtoserver;
  Inc(TimerCycle);
  timer.interval:=2500;      
  end;
  3:begin  
  buf:=HStr('93 A0 C5 01 10 00 00 00 00');  //3 пакет
  sendtoserver;    
  TimerCycle:=1;
  timer.interval:=600;    
  end;      
end;
end;

procedure Free; 
begin
timer.free;
end;


begin
    useforconnectid := ConnectID;
    if FromClient and (pck=HStr('5D 0D 00 00 00 00 00 00 00 00')) then timer.enabled:=true;
    if FromClient and (pck=HStr('5D 0C 00 00 00 00 00 00 00 00')) then timer.enabled:=false; 
end.
Bacek вне форума   Ответить с цитированием