On Aug 12, 2011, at 10:08, blinde wrote:
> I just don't have any room to breathe until into next week... but could 
> really use this functionality now. if anyone can forward how i would do this 
> in applescript, i'll take it from there... thanks.

______________________________________________________________________

Hey Bruce,

Script Name: Markup•Preview in BBEdit.scpt

Script Path: ~/Library/Application Support/BBEdit/Menu Scripts/Markup•Preview 
in BBEdit.scpt

This should save every time you use the keyboard shortcut or select the menu 
item.

Let me know if it doesn't do what you want.

Props to Rich and Patrick; the example script in the manual wasn't hard to 
figure out.

--
Best Regards,
Chris

------------------------------------------------------------------------------------------------
using terms from application "BBEdit"
  
  on menuselect(menuName, itemName)
    if menuName = "Markup" and itemName = "Preview in BBEdit" then
      
      set weHandledCommand to true
      
      try
        
        tell document of text window 1 to save
        set weHandledCommand to false
        
      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
      return weHandledCommand
    end if
  end menuselect
  
  on postmenuselect(menuName, itemName)
    -- This is called after the application has processed the command.
  end postmenuselect
  
end using terms from
------------------------------------------------------------------------------------------------

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
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 feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to