Help us understand the problem. What is going on with this article?

Evernoteで空(ノート数が0)のノートブックを取得するAppleScriptハンドラ

More than 3 years have passed since last update.
  • ノートが1つもないノートブックのリストを返す
  • 引数をfalseにすると、反対に、ノートが1つでも存在するノートブックのリストを返す
emptyNotebooksOfEvernote.scpt
tell application "Evernote"
    set emptyNotebooks to my emptyNotebooksOfEvernote(true)
    --> {notebook "EmptyNotebook" of application "Evernote"}

    notes of item 1 of emptyNotebooks
    --> {}

    set notEmptyNotebooks to my emptyNotebooksOfEvernote(false)
    exists notes of item 1 of notEmptyNotebooks
    --> true
end tell

on emptyNotebooksOfEvernote(isEmpty as boolean)
    tell application "Evernote"
        if isEmpty then
            return notebooks whose class of notebook of note 1 of it  notebook
        else
            return notebooks whose class of notebook of note 1 of it = notebook
        end if
    end tell
end emptyNotebooksOfEvernote

更新履歴

  • 2016-01-24: フィルタ機能を使って作成
szk-3
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away