• 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 preferences for an applescript application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating preferences for an applescript application


  • Subject: Re: Creating preferences for an applescript application
  • From: David Andrews <email@hidden>
  • Date: Tue, 7 Dec 2004 21:56:33 -0500

Michelle,

I took your idea and figured out how to make it work for me, thanks.  :)

Now, however, as I go back and delete old e-mails, I see that you have left out "Contents:" from your path to the preferences file. One way to add "Contents:" to your preferences file path:

set myPrefs to "Contents:myPrefs"

David A

On Nov 22, 2004, at 12:00 PM, Michelle Steiner wrote:

Create a preferences file; make the application a bundle, and store the preferences file in the bundle. Here is some code that should get you started:

set myPath to path to me
set myPrefs to "myPrefs"

try
set foo to (open for access (myPath as string) & myPrefs with write permission)
write "test case" to foo
close access foo
on error msg
display dialog msg
end try


read file ((myPath as string) & myPrefs)
display dialog the result

-- Michelle

_______________________________________________ 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
  • Prev by Date: Re: [OT] Re: Smile and FruitMenu
  • Next by Date: Re: [OT] Re: Smile and FruitMenu
  • Previous by thread: RE: Unwinding the containment hierarchy of a reference
  • Next by thread: swf movie
  • Index(es):
    • Date
    • Thread