Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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 tellend getNotesFolderon 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 tellend run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment