• 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: Creating a log file.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a log file.


  • Subject: Re: Creating a log file.
  • From: Malcolm Fitzgerald <email@hidden>
  • Date: Thu, 21 Oct 2004 11:16:43 +1000

On Oct 20, 2004, at 4:34 PM, Michelle Steiner wrote:

set new_file to choose file name default name "log.txt" default location (path to documents folder)
set fref to open for access new_file with write permission
write my_data to fref
close access fref

Michael McGonagle wrote:

Hum, I tried to run this, and each subsequent time that I ran this, keeping the same name for the log file (ie replacing it), AppleScript would not do it. ... Each time, I got an error message "File file
...Documents:log.txt is already open.".


Is this normal? Seems like a bug to me.

Not a bug. It usually only happens during testing.

The error happens when a file is opened and not closed afterwards. You can open the file many times if you don't close it just as many times the system will complain.

--
Malcolm Fitzgerald                        phone: 02 9318 0877
Database Manager                            fax: 02 9318 0530
The Australian Society of Authors         <http://www.asauthors.org>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Creating a log file.
      • From: Adrian Milliner <email@hidden>
References: 
 >Creating a log file. (From: Vic Piercy <email@hidden>)
 >Re: Creating a log file. (From: Michelle Steiner <email@hidden>)
 >Re: Creating a log file. (From: Michael McGonagle <email@hidden>)

  • Prev by Date: Re: Seeking "non-programmer's" AppleScript reference
  • Next by Date: Re: Fraction Maker
  • Previous by thread: Re: Creating a log file.
  • Next by thread: Re: Creating a log file.
  • Index(es):
    • Date
    • Thread