Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save florido/3da528adcd59d58f5a8f6c2b06024f73 to your computer and use it in GitHub Desktop.
Save florido/3da528adcd59d58f5a8f6c2b06024f73 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