Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Two AppleScripts for unmounting, mounting local disk volumes' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Two AppleScripts for unmounting, mounting local disk volumes
Authored by: oschrenk on May 16, '12 08:49:08AM
Thanks for the input! For now I'll use this:

tell application "Finder"
	eject (every disk)
end tell

tell application "System Events"
	set isRunning to (count of (every process whose bundle identifier is "com.Growl.GrowlHelperApp")) > 0
end tell

if isRunning then
	tell application id "com.Growl.GrowlHelperApp"
		set the allNotificationsList to {"Eject Disk Notification"}
		set the enabledNotificationsList to {"Eject Disk Notification"}
		
		register as application 
			"Growl Eject Disk Notification" all notifications allNotificationsList 
			default notifications enabledNotificationsList 
			--       Send a Notification...
		notify with name 
			"Eject Disk Notification" title 
			"Eject Disk Notification" description 
			"Ejected all disks." application name "Growl Eject Disk Notification" icon of application "Finder.app"
	end tell
end if


[ Reply to This | # ]