Re: Write a prefs file
Re: Write a prefs file
- Subject: Re: Write a prefs file
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 28 May 2002 07:42:29 -0700
On 5/28/02 4:43 AM, "JJ" <email@hidden> wrote:
>
> G'day all,
>
>
>
> I'd like display a dialog and the write the result a prefs file. I've done
>
> this many times before but have always used plain text files.
>
>
>
> I'd like to write a 'true' prefs file rather than a plain text file - can
>
> this be done using the write commands of vanilla AS?
>
>
>
> Thanks
>
>
>
> kim
>
>
A plain text file is a "true" prefs file, though "write" command will only
>
write to the data fork (the one you can see opening a file in a text
>
editor). But if you're talking about store some values within a resource
>
fork, you can't do it conventionally using vanilla AS. The only way can be
>
"store" a script object (which is stored in the "scpt" resource) using
>
"store script" command from Standard Additions (in fact, this is not _pure_
>
vanilla).
>
>
Also, you can use some third-party scripting additions to create a "true"
>
prefs file (file type "pref"), as "Akua Sweets" (command "save preference"),
>
"XCMD" (command "Text To Resource", perhaps more complex) or Steve LoBasso's
>
"Preferencel0" (talking from a pre-X context).
>
The Satimage osax, which you can now get separately from the script editor
Smile, also writes resources. In addition, Satimage exists in an OS X
version. (There's also a rather amazing and simple way I'd have to look up
again to write real prefs files using VBA in MS Word, meaning you can do it
in AppleScript too. I guess it would write the Classic version still in OS
X, but so so some other apps and they still work.)
--
Paul Berkowitz
_______________________________________________
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.