At 21:46 -0400 18/08/2011, Rich Siegel wrote:
On Thursday, August 18, 2011, Watts Martin <[email protected]> wrote:
...it probably has to be something the script figures out on its own.
In any running AppleScript, "path to me" returns (what looks like)
an alias to the script. To find the directory that you're running
out of, something like this will work:
tell application "Finder"
set my_folder_path to (container of (path to me) as string)
end tell
There's probably some way to turn that into a POSIX path.
set _me to "" & (path to me)
set AppleScript's text item delimiters to ":"
set _dir to "" & text items 1 through -2 of _me
set AppleScript's text item delimiters to ""
display dialog quoted form of POSIX path of _dir
You might want to omit "quoted form of"
JD
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>