Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rwilcox/4714936 to your computer and use it in GitHub Desktop.
Save rwilcox/4714936 to your computer and use it in GitHub Desktop.
BBEdit Selection to Notational Velocity (and delete)
on getNotesFolder() tell application "Finder" set homeFolder to path to home folder return folder "Notational Data" of folder "Application Support" of folder "Dropbox" of homeFolder end tell end getNotesFolder on run tell application "BBEdit" set sel to selection as string set the selection to "" tell me to set notesF to getNotesFolder() as alias activate set dialogRes to display dialog "Name the file:" default answer "something.markdown" set filePath to ((notesF as string) & (text returned of dialogRes)) set newDoc to (make new text document) set contents of newDoc to sel save newDoc to file filePath without saving as stationery end tell end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment