Anyway, my first post is up over there:
Since I have lots of readers here, I figured they might be interested.
Please leave comments below.
Please leave comments below.
tell application "Notes"
set targetFolder to "Target" -- Change this to your folder name
if not (exists folder targetFolder) then
display alert "Folder not found"
return
end if
set theNotes to notes of folder targetFolder
set noteNames to {}
set duplicates to {}
repeat with aNote in theNotes
set noteName to name of aNote
if noteNames contains noteName then
set end of duplicates to aNote
else
set end of noteNames to noteName
end if
end repeat
repeat with duplicateNote in duplicates
delete duplicateNote
end repeat
if length of duplicates is 0 then
display dialog "No duplicates found"
else
display dialog (length of duplicates) & " duplicates deleted."
end if
end tell
tell application "Notes"set mynote to make new note at folder "PDFS"make new attachment at mynote with data theFileend tell