Open Menu
Close Menu
Apple
Shopping Bag
Apple
Mac
iPad
iPhone
Watch
TV
Music
Support
Search apple.com
Shopping Bag
Lists
Open Menu
Close Menu
Terms and Conditions
Lists hosted on this site
Email the Postmaster
Tips for posting to public mailing lists
Re: UUID
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Re: UUID
Subject
:
Re: UUID
From: Luther Fuller <
email@hidden
>
Date: Thu, 31 Jan 2008 13:47:33 -0600
In case these is any question remaining, the man page for diskutil leads me to this script which returns exactly what I need ...
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.
_______________________________________________
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
Follow-Ups
:
Re: UUID
From:
"Mark J. Reed" <email@hidden>
Re: UUID
From:
"Mark J. Reed" <email@hidden>
Re: UUID
From:
Skeeve <email@hidden>
References:
>
UUID
(From: Luther Fuller <email@hidden>)
>
Re: UUID
(From: Skeeve <email@hidden>)
Prev by Date:
Re: UUID
Next by Date:
Re: UUID
Previous by thread:
Re: UUID
Next by thread:
Re: UUID
Index(es):
Date
Thread