On May 06, 2011, at 04:59, Mike wrote:
> I'd like to make an Applescript that opens the currently selected folder in a 
> disk browser.
______________________________________________________________________

Hey Mike,

When asking for scripting help it's desirable to describe the process 
completely enough that people don't have to guess at your intent.  It's all too 
easy to skip salient details, because *you* already know what you want to do.

In this instance you don't say where the currently selected folder is.  In the 
Finder?

If so then this might work for you:

tell application "Finder"
  try
    set fldr to selection as alias
    if class of (get properties of fldr) is folder then
      tell application "BBEdit"
        activate
        open fldr
      end tell
    else
      beep
    end if
  on error errMsg number errNum
    set sep to "=============================="
    set e to sep & return & "Error: " & errMsg & return & sep & return ¬
      & "Error Number: " & errNum & return & sep
    beep
    display dialog e
  end try
end tell

You can also change the size and position of the disk browser if desired.

--
Best Regards,
Chris

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