Skip to content

Instantly share code, notes, and snippets.

@patrikjohansson
Last active December 23, 2015 02:29
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 patrikjohansson/6567165 to your computer and use it in GitHub Desktop.
Save patrikjohansson/6567165 to your computer and use it in GitHub Desktop.
Opens X number of random evernote notes from a collection of notebooks
display dialog "Number of random notes?" default answer "1"
set iterations to (text returned of result)
tell application "Evernote"
-- Fetch all notebooks that the notes shoukd be randomized from
set allNotebooks to every notebook whose name does not contain "kentor" and notebook type is synchronized
repeat with i from 1 to iterations
-- Pick notebook name at random
set notebookName to name of (some item of allNotebooks)
-- Pick a random note
set allNotes to every note in notebook notebookName
set theNote to some item of allNotes
open note window with theNote
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment