On Nov 12, 12:26 am, Craig <[email protected]> wrote:
>
> What I want to be able to do is pass the name of the current project
> to our build script, but I don't know how, or if it is possible to
> access information in BBEdit and pass it to a shell script.


It's possible, although it's not as easy as it could be.

> If needed
> I will write an applescript that will pass the name of the current
> project to our build script,

Below is an Applescript that will retrieve the folder root for the
current project.


tell application "BBEdit"
        set asAlias to file of first project document as alias
        tell application "Finder" to set parentFolder to container of asAlias
as alias
        -- ^^^ assumes that the saved bbedit project folder is in the root of
the project
        return POSIX path of parentFolder
end tell


If you're asking for _just the name_, it becomes

tell application "BBEdit"
    return name of first project document
end

What you want to do is save it somewhere, then use the osascript tool
on the command line to trigger it.

Like so:

osascript /Users/rwilcox/bin/path_to_frontmost_project.applescript


The "first" project document actually means "first by frontmost
order".

Hope this helps,
_Ryan Wilcox

-- 
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>

Reply via email to