Re: why won't force-eject work in a script, but will from command line?
Re: why won't force-eject work in a script, but will from command line?
- Subject: Re: why won't force-eject work in a script, but will from command line?
- From: Charles Arthur <email@hidden>
- Date: Fri, 4 Jul 2003 11:06:21 +0100
On Fri, 4 Jul 2003 01:31:46 +0100, Nigel Garvey
<email@hidden> wrote:
>
Charles Arthur wrote on Thu, 3 Jul 2003 11:06:23 +0100:
>
>I have a portable Firewire disk called "LaCie" which, for inexplicable
>
>reasons, won't let itself be ejected from the Finder at the end of the day
>
>when I want to take it home. I get the message "The disk is in use".
>
>
Is that the actual message? I can get a similar effect with my own LaCie
>
drive by opening a file for access on it and then trying to eject the
>
disk without closing the file. "Finder got an error. The operation could
>
not be completed because the file "LaCie" is in use." Do you perhaps have
>
a script or an application that's not tidying up after itself? It might
>
be preferable to sort out the problem at that end if possible.
I often get the message from my script (which I won't repost) that four
files are open. I'm guessing they're the following, as this is what I get
when I've just plugged the thing in and not opened any files:
[Charles-Arthurs-Computer:~] charles% lsof | grep "LaCie"
ATSServer 183 charles 20r VREG 14,11 0 36028
/Volumes/LaCie (/dev/disk1)
ATSServer 183 charles 21r VREG 14,11 0 36027
/Volumes/LaCie (/dev/disk1)
ATSServer 183 charles 27r VREG 14,11 0 17772
/Volumes/LaCie (/dev/disk1)
ATSServer 183 charles 28r VREG 14,11 0 17756
/Volumes/LaCie (/dev/disk1)
Seems like the ATSServer isn't letting go when the Finder tells it to
eject. Why? Who knows?
Emmanuel meanwhile seems to have answered why my script fails:
(script)
At 8:29 am +0200 4/7/03, Emmanuel wrote:
>
> set thedecision to (display dialog "Force-eject?" buttons {"OK",
>
>"Cancel"})
>
> if thedecision is "OK" then
>
>
If that's actually your code, then the last line should never return true.
>
"thedecision" is that record. You mean "button returned of thedecision".
Thanks.
Charles
--
----------------------------
http://www.ukclimbing.com : 1100+ British crags, 350+ British climbing
walls - searchable by distance and anything else you care to think of -
with weather forecasts for every one, plus maps, articles, news and
features. And there's even a cool shop attached.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.