русский
Germany.ruForen → Архив Досок→ Programmierung

Может кто знает из Delphi

19.02.08 18:49
Re: Может кто знает из Delphi
 
  Quo Vadis патриот
Quo Vadis
in Antwort megabyte 19.02.08 07:37
Вы всё правильно поняли...
procedure TMyThreads.Execute;
var

Label 10,20,30;
begin
Form1.Edit11.Text:='Ende';
while(not Terminated)do
begin
10:Application.ProcessMessages;

If StopVariable=true then
begin
CP.RTS(1);
CP.SENDSTRING('sta,g'+chr(13)+chr(10));
status:=cp.READSTRING();
// If trim(Status)='00' then goto 10;
If trim(Status)='E 01' then goto 10;
If trim(Status)='' then goto 10;
Form1.Edit6.Text:='begin';
Sleep(100);

If (trim(Status)='04') and (StopJa=true) then
begin
Form1.StopTasteClick(Sender);
end;
If (trim(Status)='00') and (StopJa=true) then
begin
Form1.StopTasteClick(Sender);
end;
If (trim(Status)='02')and (StartJa=true) then
begin

Form1.StartTasteClick(Sender);
end;
/// Die letzten aktuellen Messwerten bekommen
20: CP.SENDSTRING('dis,g'+chr(13)+chr(10));
Distanz:=cp.READSTRING();
Distanz:=trim(Distanz);
If (length(Distanz)<11) or (length(Distanz)>11) then goto 20;
Sleep(50);
Test:='okkkkkkkkkkkkkk';
30: CP.SENDSTRING('kmh,g'+chr(13)+chr(10));
Speed:=cp.READSTRING();
Speed:=trim(Speed);
If (length(Speed)<3) and (length(Speed)>5) then goto 30;
Form1.Edit6.Text:='untennnnnnnnnnn';
end ;
Synchronize(Go);
end;
end;
 

Sprung zu