Re: Supporting several applications
Re: Supporting several applications
- Subject: Re: Supporting several applications
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 25 Jun 2001 18:05:05 -0400
on 6/25/01 2:02 PM, Jan Erik Mostrvm at email@hidden wrote:
>
So, let's say that user X downloads my script and wants to use database A.
>
What
>
I would like to avoid are the questions for B, C, and D since they are
>
non-existent of X machine.
Interesting problem. The solution that comes first to mind is to put all of
the app-specific code into four separate script libraries, one for each app.
Make sure the handler names are the same for each handler in each library,
so your main script won't notice any differences. Then the main script, the
first time it is run, should ask the user which library to use, and store
the resulting library code in a property. Since the property is persistent,
subsequent runs of the script won't ask, but will just run.
If you want to be really cute, you would search the user's disk for the four
apps' signatures, automatically use one library if only one of the apps is
found, and ask for the user's choice only if more than one is found.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
The AppleScript Sourcebook - www.AppleScriptSourcebook.com
Vermont Recipes - www.stepwise.com/Articles/VermontRecipes