Path to internal AS Studio resources?

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?

Applications:EnvironmentLauncher.app:Contents:Resources:dev:test.plist

Is there a way to use drag and drop or some other AS Studio - Project builder GUI to reference this?

Thanks

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!

I can get to the directory structure just fine with this path:

Applications:EnvironmentLauncher.app:Contents:Resources:dev:test.plist

What I am asking, more specifically, is:

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?

thanks

Maybe there’s someone on the AppleScript Studio forum who can help. Some visit only the forums that interest them. :slight_smile:

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