From: Steve Hodgson on
On 2010-04-26 18:25:49 +0100, Bruce Horrocks said:

> On 25/04/2010 00:13, Steve Hodgson wrote:
>
>> What's the best route to build up a list of ejectable drives that
>> excludes network drives such as MobileMe?
>
> Try
>
> tell application "Finder" to eject (every disk whose ejectable is true
> and local volume is true)
>
> All one line.

That still seems to work very well. It's slower than hardwiring the
drive names but one would expect that.

I've ended up with something very different from what I started out
with and the line above is at the heart of it but I've added some Growl
stuff around it to provide some feedback. Any more feedback would be
welcome but thanks very much for your help.

tell application "GrowlHelperApp"
set the allNotificationsList to {"Eject Notification"}
set the enabledNotificationsList to {"Eject Notification"}
register as application �
"Growl AppleScript Eject" all notifications allNotificationsList �
default notifications enabledNotificationsList �
icon of application "Script Editor"
end tell

tell application "Finder" to eject (every disk whose ejectable is true
and local volume is true)

tell application "GrowlHelperApp"
notify with name �
"Eject Notification" title �
"Eject Notification" description �
"All drives ejected." application name "Growl AppleScript Eject"
end tell


--
Cheers,

Steve

The reply-to email address is a spam trap.
Email steve 'at' shodgson 'dot' org 'dot' uk

From: Steve Hodgson on
On 2010-04-26 18:25:49 +0100, Bruce Horrocks said:

> On 25/04/2010 00:13, Steve Hodgson wrote:
>
>> What's the best route to build up a list of ejectable drives that
>> excludes network drives such as MobileMe?
>
> Try
>
> tell application "Finder" to eject (every disk whose ejectable is true
> and local volume is true)
>
> All one line.

One final point.

As soon as I took my working AppleScript and ran it through Keyboard
Maestro I got my dialog about the partitioned drive. Run it thought
Applescript or Launchbar - no dialogue.

I took the same script, wrapped it up into an Automator app and no
dialog. Capricious or what?
--
Cheers,

Steve

The reply-to email address is a spam trap.
Email steve 'at' shodgson 'dot' org 'dot' uk

First  |  Prev  | 
Pages: 1 2 3
Prev: Airport Express alternative?
Next: A haaaannnndbag?