infinitepatt_rns Applescript: Open with Default Application
Nov 03, 2008; 02:22
infinitepatt_rns
Applescript: Open with Default Application
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 bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscribe@googlegroups.com 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 "support@barebones.com" rather than posting to the group. -~----------~----~----~----~------~----~------~--~-
Nov 03
johndelacour Re: Applescript: Open with Default Application
Nov 03, 2008; 08:32
johndelacour
Re: Applescript: Open with Default Application
Nov 04
infinitepatt_rns Re: Applescript: Open with Default Application
Nov 04, 2008; 03:58
infinitepatt_rns
Re: Applescript: Open with Default Application
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!