Re: Resource folder of library script?
Re: Resource folder of library script?
- Subject: Re: Resource folder of library script?
- From: Jim Brandt <email@hidden>
- Date: Tue, 11 Feb 2014 18:35:27 -0600
On 11-Feb-2014, at 12:45 PM, Luther Fuller wrote: One more comment I need to add ...
What I was suggesting in my first reply was that the library for "Main.app" should be stored within the "Main.app" bundle. (If possible.) This has the advantage that the library for "Main.app" need not be installed separately from "Main.app". Simply move a copy of "Main.app" to any Mac and the library goes with the application.
I thought about that. The problem is, the library script needs to be available not to just one script, but to some twenty scripts. I don't want to have to update twenty resource folders every time a library handler changes.
Also, these libraries are being installed on multiple computers via dropbox, and thus the library location changes from machine to machine, so I need a way to locate it dynamically.
On 11-Feb-2014, at 12:45 PM, Jörgen Stahle wrote: Here is how you do it: set sa to load script (path to resource "ScriptA.app") -- scriptA.app is located in the Resources folder
You can also use subfolders: set sa to load script (path to resource "Helpers/ScriptA.app") -- scriptA.app is located in the subfolder "Helpers" under Resources folder
Jörgen,
That gets me the resource folder in the main script. I need to know it's location from within ScriptA, the handler. I want the handler to find files stored in it's own Resource folder, not the main script. After all, the main script already knows where the library file is, getting the resource folder to it is easy. |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden