Re: Creating preferences for an applescript application
Re: Creating preferences for an applescript application
- Subject: Re: Creating preferences for an applescript application
- From: Michelle Steiner <email@hidden>
- Date: Mon, 22 Nov 2004 10:00:11 -0700
On Nov 22, 2004, at 9:42 AM, Bjorn Sodergren wrote:
I wrote a couple of small applescript applications to assist us in the
prepress area. However, i would like to make it easy for others to
change some of the properties i use in the script (server, user/pass,
directories)
Does anyone know of some good docs or examples that will help me
support this feature?
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
--
Don't assume I'm straight. Don't assume I'm not.
_______________________________________________
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