• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Resource folder of library script?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resource folder of library script?


  • Subject: Re: Resource folder of library script?
  • From: Jim Brandt <email@hidden>
  • Date: Tue, 11 Feb 2014 06:02:05 -0600


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.


 _______________________________________________
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

  • Follow-Ups:
    • Re: Resource folder of library script?
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Why these errors?
  • Next by Date: Re: Why these errors?
  • Previous by thread: Re: Resource folder of library script?
  • Next by thread: Re: Resource folder of library script?
  • Index(es):
    • Date
    • Thread