Skip to content

Instantly share code, notes, and snippets.

@nickwynja
Created October 25, 2013 15:21
Show Gist options
  • Save nickwynja/7156426 to your computer and use it in GitHub Desktop.
Save nickwynja/7156426 to your computer and use it in GitHub Desktop.
Open in Marked
try
tell application "BBEdit"
if front window exists then
if class of front window is not in {shell window, scratchpad_window} then
tell front text document of front window
if its file ≠ missing value then
set frontTextDoc to its file as alias
else
error "The Front Text Document Is Unsaved!"
end if
end tell
else
error "Front Window Is NOT A Text Document!"
end if
else
error "No Windows Are Open!"
end if
end tell
tell application "Marked"
activate
open frontTextDoc
end tell
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment