I think it would be much faster to replace current accountGetAllNotes code:
on accountGetAllNotes(accountName)
(* Get all notes for an account
Args:
accountName: name of account to get notes for
Returns:
list of note ids in account
*)
set allNotes to {}
tell application "Notes"
tell account accountName
repeat with i from 1 to the count of notes
set noteID to «class seld» of (note i as record)
copy noteID to end of allNotes
end repeat
end tell
end tell
return allNotes
end accountGetAllNotes
with:
on accountGetAllNotes(accountName)
(* Get all notes for an account
Args:
accountName: name of account to get notes for
Returns:
list of note ids in account
*)
set allNotes to {}
tell application "Notes"
tell account accountName
set allNotes to id of notes
end tell
end tell
return allNotes
end accountGetAllNotes
I think it would be much faster to replace current
accountGetAllNotes
code:with: