Most of the list verbs will return either just a list of names or an Extract Record. This contains most of the important data about the unit. They are AppleScript “Records” and the fields of information can be accessed by the name of the field like. Property names currently available in the Extract record are:
Once you have an extract record from any source you access it via these keys:
write log (xtName of MyUnitExtractRecord) & " is " & (xtCurrentLabel of MyUnitExtractRecord)
These all can also be accessed via an individual units applescript object model. So if you’re interested in checking to see if a single unit is blocked you can do something like this:
if xtBlocked of xUnit “my Unit Name” then write log “The unit is blocked" else write log “the unit is NOT blocked" end if
a particularly useful one is the xtCurrentLabel of xUnit “my unit name” which will return the currently applicable label “on” or “off” or “open” or “closed” or “alarm” or “clear” or whatever you have in those fields in the unit based on the current status with no further checking of values on your part.
Additionally further properties can be accessed through the xUnit class that are not included in the extract record.