On 10-Feb-2014, at 12:03 PM, Luther Fuller wrote: If possible ... You might want to consider putting library scripts into the script application bundle. You will have to save your script as an application bundle, and as a consequence, your script will always know where its library is located.
But, is this possible in your situation?
Luther,
Here's a script representing my library:
on ScriptA() display dialog (path to me) as text end ScriptA
save it as a script bundle named ScriptA and run it using a second script:
set sa to load script alias (((path to desktop) as text) & "ScriptA.app")
sa's ScriptA()
the display points to the call script's path
save ScriptA as an application and the result is the same.
What I want is the path to the ScriptA, not to the calling script. I want to store resources in the script bundle of ScriptA, and have ScriptA know how to retrieve those resources, no matter where ScriptA is stored. (using a path to resource folder in ScriptA). Instead, I'm getting the path to the resource folder of the calling script.
What I was looking for is if there is an "accepted" way to address the resource folder of a Script bundle from within in itself when it is called by another script?
Hope this clears up what I'm trying to do.
|