View Single Post
Old 02-15-2010, 04:57 PM   #31
ischeriad
Connoisseur
ischeriad began at the beginning.
 
ischeriad's Avatar
 
Posts: 91
Karma: 28
Join Date: Apr 2007
Location: Germany
Device: PB Pro 903, Kobo Touch [Past: Story, Clié N770C, SL-10, Palm IIIxe, V]
I have extended the script to allow unmounting of the reader and memory card(s) together.

Code:
(*
	Script for unmounting reappearing eBook reader volumes
	writen for mobileread forums, © 2010 ischeriad
*)

set ListOfVolumeNames to {"STORY", "STORY SD"}

tell application "Finder"
	repeat with VolumeName in ListOfVolumeNames
		if (exists the disk VolumeName) then
			set MountPoint to do shell script "diskutil info '" & VolumeName & "' | sed -n 's/.*Mount Point[^/]*//p'"
			do shell script "dot_clean -n '" & MountPoint & "' && diskutil unmount '" & MountPoint & "'"
		end if
	end repeat
end tell
ischeriad is offline   Reply With Quote