Re: Determining File Path of Running Script Application
Re: Determining File Path of Running Script Application
- Subject: Re: Determining File Path of Running Script Application
- From: Walter Ian Kaye <email@hidden>
- Date: Thu, 29 Jul 2004 02:32:50 -0700
At 02:12a -0700 07/29/2004, Rick Gordon didst inscribe upon an
electronic papyrus:
How can a script application determine its own file path?
For instance, if I wanted to write a script that would do something like this:
do shell script "cd MY_FILEPATH; open
./TARGET_PACKAGE/Contents/MacOS/TARGET_FILE"
....where the intention is to be able to traverse a relative
filepath to the target.
I see two possibilities...
If the package is an .app, you can get the path using its creator
code or bundle identifier via the Finder.
If it's not an .app, then you could have your shell script write a
temporary file to a known location and have the script read that file.
There may be other avenues, depending on the specifics of your needs.
-Walter
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.