TargetID
Returns the current target cursor ID.
If a target cursor is active (IsTargeting = True) but the cursor ID is 0, a special constant is returned for backward compatibility.
Returns 0 if no target cursor is active.
Возвращает ID текущего курсора цели.
Если курсор цели активен (IsTargeting = True), но его ID равен 0, возвращается специальная константа для обратной совместимости.
Возвращает 0, если курсор цели не активен.
function TargetID: Cardinal;
def TargetID() -> int: ...
begin
if TargetID > 0 then
AddToSystemJournal('Target cursor active, ID: $' + IntToHex(TargetID, 8))
else
AddToSystemJournal('No target cursor');
end.
tid = TargetID()
if tid > 0:
AddToSystemJournal(f'Target cursor active, ID: ${tid:08X}')
else:
AddToSystemJournal('No target cursor')