automation - AppleScript "Can’t get every note of account" -


i'm trying out applescript first time today.

wanted start logging name of every note in notes.app

here's script:

tell application "notes"     activate     set mainaccount name of account 1     tell account mainaccount         repeat n in notes             log name of n string         end repeat     end tell end tell 

i error message:

tell application "notes"     activate     name of account 1         --> "icloud"     exists folder "archive" of account "icloud"         --> true     count every note of account "icloud"         --> error number -1728 every note of account "icloud" result: error "notes got error: can’t every note of account \"icloud\"." number -1728 every note of account "icloud" 

what's happening here?

accounts don't have notes, have folders.

so script can written this:

tell application "notes"     activate     set mainaccount name of account 1     tell account mainaccount         repeat f in folders             repeat n in notes of f                 log name of n string             end repeat         end repeat     end tell end tell 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -