On Monday, March 21, 2011, Charlie Garrison
<[email protected]> wrote:
FRONT_DOC=`osascript -e 'tell application "BBEdit" to get POSIX
path of ((file of front document) as string)'`
So, not built-in to BBEdit, but just a one-liner to add to existing scripts.
When you run a script or filter from the #! menu, BBEdit sets up
some variables in the environment, one of which is BB_DOC_PATH,
the path to the front document. (This was introduced in 9.3, so
you can find more details in the 9.3 change notes at
<http://www.barebones.com/support/bbedit/arch_bbedit93.html>, as
well as in the user manual.)
If you're running a script outside of BBEdit, then the example
above is definitely useful and helpful.
R.
--
Rich Siegel Bare Bones Software, Inc.
<[email protected]> <http://www.barebones.com/>
Someday I'll look back on all this and laugh... until they
sedate me.
--
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>