LastStepQUsedDoor
Contains the serial (ID) of the door that was opened during the last StepQ call, or 0 if no door was opened.
This is a read-only variable in practice — it is reset to 0 at the start of each StepQ call and set to the door’s ID if moveOpenDoor is enabled and a door was opened during the step.
In Python, use GetLastStepQUsedDoor().
Содержит serial (ID) двери, которая была открыта во время последнего вызова StepQ, или 0 если дверь не открывалась.
Фактически переменная только для чтения — сбрасывается в 0 в начале каждого вызова StepQ и устанавливается в ID двери, если moveOpenDoor включён и дверь была открыта.
В Python используйте GetLastStepQUsedDoor().
var LastStepQUsedDoor: Integer;
def GetLastStepQUsedDoor() -> int: ...
var
Res: Integer;
begin
moveOpenDoor := True;
Res := StepQ(0, True);
if LastStepQUsedDoor > 0 then
AddToSystemJournal('Opened door: $' + IntToHex(LastStepQUsedDoor, 8));
end.
SetMoveOpenDoor(True)
StepQ(0, True)
door = GetLastStepQUsedDoor()
if door > 0:
AddToSystemJournal(f'Opened door: ${door:08X}')