So we decided to obtain the disk’s id property so as not to confuse anything when the name changes.
the following code:
tell application "Finder" to get id of disk "grumpy"
Returns -101, the id of the disk, under LEOPARD.
and the code
tell application "Finder" to get properties of disk "grumpy"
Shows “id:-101” in the Results. This is under LEOPARD.
However, when I switch to Tiger, the code gives an error “unknown object type” for the word “id” and the “id” property is not listed in the properties of the disk.
Is this a known problem with the “id” property?
If so, is there a workaround for getting a unique reference to the disk so that we can change its name?
Thanks.
Model: Mac Pro/MBP
AppleScript: 2.0 and 1.9
Browser: Safari 3 Leopard
Operating System: Other
Regarding discussion of “LEOPARD”, remember that you’re still under NDA.
Tiger’s Finder only provides id properties on window classes and only allows the by-id reference form to be used with ‘window’ and ‘application file’ elements (the latter for non-standard purposes at that).
Use aliases. Alias values keep track of filesystem objects even if they’re moved or renamed. To convert between aliases and Finder references:
tell application "Finder"
set anAlias to finderRef as alias -- Finder reference to alias
set finderRef to item anAlias -- alias to Finder reference
end tell