Loading ...
Sorry, an error occurred while loading the content.

226Re: Script for viewing markdown in Marked

Expand Messages
  • Michael
    Aug 2, 2011
      For reasons not entirely clear to me, the script will hang on some files (naturally, none I tested before posting about it!), with SubEthaEdit waiting for a response from Marked. Adding an <code>ignoring application responses</code> takes care of that. Sorry for any inconvenience.

      Here's the revised script:

      tell application "SubEthaEdit"
      if not (exists path of front document) then
      error "You have to save the document first"
      end if
      set docpath to the path of the front document
      end tell

      set mdFile to POSIX file docpath
      ignoring application responses
      tell application "Marked" to open mdFile
      end ignoring

      on seescriptsettings()
      return {displayName:"Preview with Marked", shortDisplayName:"Preview", keyboardShortcut:"@O", toolbarIcon:"ToolbarIconRun", inDefaultToolbar:"yes", toolbarTooltip:"Preview current document with Marked", inContextMenu:"no"}
      end seescriptsettings
    • Show all 2 messages in this topic