Posted at


More than 3 years have passed since last update.

  • Evernoteのノートには「作成者」情報がある

    • メールからノートを作成すると、送信元アドレスが作成者になる

  • あるノートから作成者を取得する方法

    • tell application "Evernote" to get author of note 1 of notebook 1

  • ある作成者のノートだけを取得する方法

    • tell application "Evernote" to find notes "author:作成者"

  • 下のAppleScriptは全ノートに含まれる作成者を取得してリストにするハンドラ


use scripting additions

use framework "Foundation"

my everyAuthorInEvernote()

on everyAuthorInEvernote()
return text of my everyParameterOfNotesInEvernote("author")
end everyAuthorInEvernote

on everyParameterOfNotesInEvernote(noteParameter as text)
--require framework: Foundation
set everyParameter to current application's NSMutableSet's |set|()
repeat with parameterList in run script "tell application \"Evernote\" to return " & noteParameter & " of notes of notebooks"
(everyParameter's addObjectsFromArray:parameterList)
end repeat
set comparator to my appropriateComparatorToSort(everyParameter's anyObject())
set sortDescriptor to current application's NSSortDescriptor's sortDescriptorWithKey:"self" ascending:true selector:comparator
return (everyParameter's sortedArrayUsingDescriptors:{sortDescriptor}) as list
end everyParameterOfNotesInEvernote

on appropriateComparatorToSort(anObject)
--require framework: Foundation
if anObject missing value and (anObject's respondsToSelector:"localizedCaseInsensitiveCompare:") then
return "localizedCaseInsensitiveCompare:"
return "compare:"
end if
end appropriateComparatorToSort


  • 2016-03-02: everyAuthorInEvernoteハンドラ作成