Skip to content

Instantly share code, notes, and snippets.

@panicsteve
Created September 24, 2015 21:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save panicsteve/855bd71bbdb3cbc1d9b1 to your computer and use it in GitHub Desktop.
Save panicsteve/855bd71bbdb3cbc1d9b1 to your computer and use it in GitHub Desktop.
// add-note.scpt
//
// Example of creating a new note in Notes.app using JavaScript for Automation
// Steven Frank <stevenf@panic.com>
notesApp = Application('Notes');
notesApp.activate();
var note = notesApp.Note({
'name': 'Test Note',
'body': 'This is just a test note.'
});
notesApp.folders[0].notes.push(note);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment