• 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: Writing To A File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing To A File


  • Subject: Re: Writing To A File
  • From: Walter Ian Kaye <email@hidden>
  • Date: Mon, 29 Sep 2003 14:25:17 -0700

At 12:52p -0700 09/29/2003, Randy Beaudreault didst inscribe upon an electronic papyrus:

Hi All,

I'm having problems with the next portion of my script. I'm unable to write to my file:
set Date_File to open for access file ":Users:maccult:Library:Preferences:once-a-day" with write permission
write (day of (current date)) to Date_File
close access Date_File

I'm wondering if my syntax is correct or is this a bug with the Standard Additions?

It's probably your file reference. Starting with ":Users" is not likely to do what you want. Here's something more reliable:

file ((path to preferences from user domain as string) & "once-a-day")


OS X - UNIX for the rest of us

...especially funny when you think of Apple as the largest Unix vendor. :)


-boo
_______________________________________________
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.

  • Follow-Ups:
    • File Path Separator Syntax (was Re: Writing To A File)
      • From: Walter Ian Kaye <email@hidden>
    • Re: Writing To A File
      • From: Steve Mills <email@hidden>
References: 
 >Writing To A File (From: Randy Beaudreault <email@hidden>)

  • Prev by Date: Re: Weird error
  • Next by Date: Re: Writing To A File
  • Previous by thread: Re: Writing To A File
  • Next by thread: Re: Writing To A File
  • Index(es):
    • Date
    • Thread