Re: UUID
Re: UUID
- Subject: Re: UUID
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 31 Jan 2008 19:43:54 -0500
OK, Luther, to avoid any issues with duplicate volume names, just replace this:
"diskutil info /Volumes/" & (name of adisk) & "/"
with this:
"diskutil info " & (quoted form of POSIX path of adisk)
(the trailing / isn't needed.)
on run
tell application "Finder"
try
set diskList to (disks whose local volume is true and ejectable is
true) as alias list
on error
set diskList to {(some disk whose local volume is true and
ejectable is true) as alias}
end try
repeat with adisk in diskList
"diskutil info /Volumes/" & (name of adisk) & "/"
set uuid to do shell script the result
--
set AppleScript's text item delimiters to {"UUID:"}
set uuid to text item 2 of uuid
set AppleScript's text item delimiters to {return}
set uuid to (text item 1 of uuid)
set AppleScript's text item delimiters to {space}
set uuid to last text item of uuid
--
display dialog uuid
end repeat
end tell
end run
I am amazed that I still have to use the try-block to work-around
AppleScript's inability to get a one item list.
--
Mark J. Reed <
email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
References: | |
| >UUID (From: Luther Fuller <email@hidden>) |
| >Re: UUID (From: Skeeve <email@hidden>) |
| >Re: UUID (From: Luther Fuller <email@hidden>) |