Hi,it seems to me, that “editdocument” from AppleScript Notes Dictonary is just not working when bypassing an existing document :
tell application “Notes”
set maildb to make new database with data {"", ""}
try
openmail maildb
end try
set uiws to make new uiworkspace
set aview to getview of maildb viewname "($Drafts)"
set adoc to getfirstdocument of aview
set uiMail to editdocument of uiws document adoc
flush bridge
end tell
It always ends up with an error message. Without document parameter, “editdocument” works fine.
For debugging reasons I already inserted dialogs, which let me print out universalid of document…
Can someone confirm this?
rgds
Jerry