• 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: why won't force-eject work in a script, but will from command line?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Sort value pairs in a list by integer
  • Next by Date: Re: Calling OSX AppleScript from Classic Apps
  • Previous by thread: Re: why won't force-eject work in a script, but will from command line?
  • Next by thread: Moving IMAP messages in Entourage
  • Index(es):
    • Date
    • Thread