tell application "System Events" ejectable of disk "the_disk:" end tell
The internal HD will return false The jumpdrive one will returtn true
Yvan KOENIG (VALLAURIS, France) vendredi 10 septembre 2010 16:22:03
Trying this, all ejectable properties came back as false:
tell application "System Events" set diskList to every disk <== this list has two entries for HD1, HD2 and HD4, the 3 partitions of the jump drive. Nothing in the list differentiates the HD from the jump drive set maxDisks to count of diskList repeat with d from 1 to maxDisks set nm to name of item d of diskList as text set dn to displayed name of item d of diskList as text set ej to ejectable of item d of diskList as text display dialog (d as text) & return & nm & return & dn & return & ej end repeat end tell
This was on a PowerPC running 10.4.11.
Disk "HD1" points to the HD, not to the jump drive. That's my point ... they both have the same name. I need to know how to be able to refer to them individually.
Jim Brandt
|