I am creating a script that copies some files from the AS Studio App to another location.
I want to be able to reference those internal files in my script to duplicate them.
How can I do this other than using a path like this one, which follows the path of the App and package contents?
You should use this AppleScript command “path to me” to get the path of the AS Application!
display dialog (the path to me as string) – displays the path to AppleScript Studio App
PS. If you wan’t to use Shell Script to copy the files, you need to convert the path returned to posix path format before you executing!
Is there a method to link or point to AS Studio resources within Project Builder?
If I have a file called ProblemFile.txt and it is added as a resource. How can I reference that file within AS Studio?
Mabey something like a ASStudio.app:resources:ProblemFile.txt instead?
OR something similar?
this will display a dialog with the POSIX path of the file
on clicked theObject
--I use the single "'" to make sure the returned POSIX path is OK for shell calls
set thePath to "'" & POSIX path of (path to me) & "Filetext.txt'" as string
display dialog thePath
end clicked