I would like to write text to a "Note" (as opposed to a standard .txt or .rtf file), because Mac Notes automatically sync to an iCloud account, across devices.
(I understand that one can use various means to achieve the same effect with standard, i.e., non-proprietary, text documents, e.g., with a service like Dropbox. Notes.app is simply much more convenient.)
However, it appears that there is no way to write to a Note in AppleScript. I say this because, it doesn't seem that Notes are actually saved anywhere on the Mac as an .rtf (or similar) file. Per this question (but, note that the question was asked in 2013), I checked out the following directories:
I found nothing that resembled a readable text document. I opened some of these files in TextEdit.app, and discovered that these files contain pure gobbledygook-text.
I'd imagine that I could effectively code an AppleScript to "write to a Notes document," by triggering mouse clicks and key presses. But, I am curious if writing to a Note can be done, in a "proper" fashion.