Skip to content

Instantly share code, notes, and snippets.

@brettkelly
Created November 5, 2013 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save brettkelly/7325244 to your computer and use it in GitHub Desktop.
Save brettkelly/7325244 to your computer and use it in GitHub Desktop.
property targetDir : "/Users/bkelly/Dropbox/Notes/"
property editorApp : "/Applications/Byword.app"
on getNewFileName()
set fileName to (text returned of (display dialog "Enter the filename with extension" default answer "Untitled-1.md"))
return fileName
end getNewFileName
tell application "Byword"
set fname to my getNewFileName()
set fullPath to quoted form of (targetDir & fname)
do shell script "touch " & fullPath
do shell script "open " & editorApp & " " & fullPath
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment