Skip to content

Instantly share code, notes, and snippets.

@digiltd
Last active January 24, 2016 16:33
Show Gist options
  • Save digiltd/78c674672a0861a7ed9b to your computer and use it in GitHub Desktop.
Save digiltd/78c674672a0861a7ed9b to your computer and use it in GitHub Desktop.
Open the current note in nvALT in Marked 2
tell application "System Events" to tell process "nvALT"
set p to value of text field 1 of group 1 of toolbar 1 of window 1
set homeDir to (path to home folder from user domain as Unicode text)
-- replace "Dropbox:_SYNC:nValt:" with your notes folder and change ".markdown" if needed
set f to (homeDir & "Dropbox:_SYNC:nValt:" & p & ".markdown") as alias
end tell
tell application "Marked 2"
open f
activate
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment