5

I'm really new to AppleScript so this is a real basic question but I couldn't find the answer or an example in the AppleScript ref. guide.

I'm making a simple script that I'll bundle as an application file, in the AppleScript Editor I can see the app's Bundle Contents in which I have an icon, a description file and a Scripts folder. How do I access that content from the script and how do I access the scripts inside the scripts folder?

DᴀʀᴛʜVᴀᴅᴇʀ
  • 7,681
  • 17
  • 73
  • 127
just_a_dude
  • 2,745
  • 2
  • 26
  • 30

1 Answers1

8

If you save your script as a script bundle or as an application bundle you can use the path to resource command, e.g.:

path to resource "description.rtfd"

Also see Commands Reference.

sakra
  • 62,199
  • 16
  • 168
  • 151
  • 1
    Great; to answer the 2nd part of the question: to get script file "SomeScript.scpt" from the "Scripts" subfolder, use `path to resource "SomeScript.scpt" in directory "Scripts"`. – mklement0 Jun 22 '14 at 05:04