Running an application within a bundle

Hello all,

I’m trying to create an applescript bundle which, in turn, executes another application contained within the bundle in /Contents/Resources/

My script is like so:

tell application "Finder"
	open application file "DosBox.App" of folder "Resources" of folder "Contents" of application file "Star Trek - 25th Anniversary.app"
end tell

My problem is that, when I move my main application around (it seems any other place rather than the desktop), the Finder cannot locate the executable inside the bundle as the paths have changed. Is there a way to script this so it knows to look in /Contents/Resources relative to wherever it is placed?

Hope this is not confusing, thanks in advance for any assistance :slight_smile:

Model: PowerMac G5
AppleScript: 1.10
Browser: Firefox 1.0.7
Operating System: Mac OS X (10.4)

Try something like this:

tell application "Finder" to open alias ((path to me as text) & "Contents:Resources:DosBox.app")

Worked perfectly, thank you very much!