• 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: file is already open & file wasn't open
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file is already open & file wasn't open


  • Subject: Re: file is already open & file wasn't open
  • From: Arnaud Nicolet <email@hidden>
  • Date: Sat, 21 Apr 2007 01:18:23 +0200
  • Resent-date: Sat, 21 Apr 2007 01:19:50 +0200
  • Resent-from: Arnaud Nicolet <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: Applescript Users <email@hidden>

Le 21 avr. 07 à 00:23 Matin, Gil Dawson a écrit:

However, in 9.2.2, this:

Produces the following log:

tell application "Finder"
exists file "Max106:Applications:MacHTTP:Projects:GoogleMaps:GilLog.log"
--> true
end tell
tell current application
open for access file "Max106:Applications:MacHTTP:Projects:GoogleMaps:GilLog.log" with write permission
(*Error= File file Max106:Applications:MacHTTP:Projects:GoogleMaps:GilLog.log is already open.. Number=-49*)
close access file "Max106:Applications:MacHTTP:Projects:GoogleMaps:GilLog.log"
(*Error2= File Max106:Applications:MacHTTP:Projects:GoogleMaps:GilLog.log wasn't open.. Number=-38*)
end tell


So I can't open it because it is already open and I can't close it because it wasn't open. I must be overlooking something.

No, that's logical.
The file is previously open (either by your script or by another application).
Then you run your script, you try to open it for access, but it is already open (for whatever reason). You get the -49 error (file already open with write permission).
After that, you try to close it, but, since you were not able to open it, you get a File not open error (-38).


Anyone remember what it is?

Your file is open by another application or by your script and you can't re-open it while it is not released.


What is 9.2.2 error code -49?

File already open with write permission. _______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: file is already open & file wasn't open
      • From: Gil Dawson <email@hidden>
  • Prev by Date: file is already open & file wasn't open
  • Next by Date: Re: file is already open & file wasn't open
  • Previous by thread: Re: file is already open & file wasn't open
  • Next by thread: Re: file is already open & file wasn't open
  • Index(es):
    • Date
    • Thread