Hello all,
I'm trying to construct a script that opens a member document of a
project with its default application. The script below (credit to
Michael Tsai) works great for a browser window, but falters with a
project window when modified.
####
tell application "BBEdit"
(* replace disk browser window -> project window in line directly
below)
if class of window 1 is disk browser window then
(* with the replacement above, line directly below returns an error *)
(* the error may be related to use of selection instead of project
item *)
set s to selection of window 1
set f to alias 1 of s
else
set f to file of window 1
end if
end tell
tell application "Finder"
open f
end tell
####
Why find a solution for a bbproj environment? The project windows work
well: immediate access to any type of file (including pdf files with
defaults write preference settings). I just need to bypass the
contextual Reveal in Finder (in the case of xml-type files) and get
the above script working. Thereafter it's easy to bind the script to a
keyboard shortcut, eg, Control-Return.
I am an applescript illiterate. Thanks in advance for any brief
pointers.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
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 specific feature request or would like to report a suspected (or
confirmed) problem with the software, please email to "[EMAIL PROTECTED]"
rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---