Previous  |  Main  |  Next
AppleScript Logo

Open Front Document with Default App

Script for: BBEdit
Copyright: Free, use at your own risk!
Description: Opens the frontmost document in BBEdit with its default application.
Necessary: None
Download: FrontDocToDefaultApp.hqx
The Script:
tell application "BBEdit 6.0"
	set DocPath to file of document 1
	set DocName to name of window 1
end tell

	tell application "Finder" to open DocPath
on error
	display dialog "Can't open \"" & DocName & "\" in its default " & ¬
		"application!" with icon caution buttons {"OK"} default button 1
end try


Contact: Matthias Steffens  |  Previous  |  Main  |  Next  |  Last Updated: 23-Sep-00