On Saturday, July 2, 2011, TJ Luoma <[email protected]> wrote:

Problem: I want to open the front-most file in BBEdit in another
application by pressing some keyboard command.

Let's say the other application is TextEdit, but it could be any
application.

In that case, you'll use:

    tell application "TextEdit"

        open <foo>

    end tell

set thefile to document 1 of application "BBEdit"

A document has properties, one of which is its file -- documents don't equate to files on disk, though. So, "<foo>" in the above becomes:

    file of document 1 of application "BBEdit"

Thus:

    tell application "TextEdit"

        open file of document 1 of application "BBEdit"

    end tell

2.    recommend a good "AppleScript for beginners" book?

<http://www.barebones.com/support/resources/bookshelf.html>

Enjoy,

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>

Reply via email to