On Sep 4, 2007, at 2:47 PM, Tim Gray wrote:
I have a question about the Unix Scripts function (not the
Filters). What kind of information is passed to the scripts upon
execution. Is the path to the active document stored in some
accessible way?
Currently this information isn't passed to the script or accessible
when running from the #! menu.
I ask because I'd like to be able to write a couple scripts that do
things like change permissions on the active document. I'm sure I
could and will do this in Applescript, but it would be so much
easier and quicker for me if I could write this kind of stuff in a
shell script.
You could us a hybrid approach like this:
tell application "BBEdit"
set f to file of document 1
end tell
set p to quoted form of (POSIX path of f)
set c to "chmod 644 " & p
do shell script c
Jim
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>