if idTelnet1.Connected then Begin String_response:=''; Status_response:= False; idTelnet1.WriteLn(command); while not Status_response do Sleep(0); //зависает здесь end;