Created
February 5, 2013 14:54
-
-
Save rwilcox/4714936 to your computer and use it in GitHub Desktop.
BBEdit Selection to Notational Velocity (and delete)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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