Re: Calling a handler in ASS project from applescript
Re: Calling a handler in ASS project from applescript
- Subject: Re: Calling a handler in ASS project from applescript
- From: "Gary (Lists)" <email@hidden>
- Date: Wed, 02 Nov 2005 09:02:22 -0500
"has" wrote:
> Mark Butler wrote:
>
>> Is there any easy way to call a handler in an ASS project from an
>> applescript?
>
> Not really, it's hacks and kludges all the way. (File a feature request, yada
> yada yada...)
>
>
>> What I would like to do is build a studio application with a bunch of
>> different miscellaneous scripts and be able to use the preferences
>> from the studio app, but I would need to call them from a applescript
>> file.
>>
>> I mainly want to do this for the preferences I can easily create in a
>> studio application.
>
> Sounds like you're not using the ASS app to run or interact with the scripts,
> only to configure their preferences. If that's the case, why not keep the
> scripts on their own but put their configuration data into a preferences file
> of some sort, then write a simple ASS app for editing those prefs files via a
> graphical interface? That'd be the standard solution.
Yes, the original post suggested lots of overkill.
I don't know about "standard solution" (probably Studio is not standard, for
most AppleScript writers) but for creating, using, changing preferences from
AppleScript, I believe that one of the fastest and easiest methods is to
simply use a Plist.
The makers of Smile produce XMLLib.osax. In this extension are very easy to
use Plist commands which make an ideal preference system.
For beginning AS authors, or for those who feel uncertain about how to go
about using a Plist for preferences, the relevant Plist commands take a very
basic AS record with keys and values. All the XML construction is handled
for you, creating a portable Plist file.
There is no better way, IMO, for creating and using a simple preferences
file ('read'/'write' to a text file is neither easier nor faster nor 'safer'
than these Plist tools.)
--
Gary
_______________________________________________
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