@ccstone macro gave me a good starting point to try to create a macro that will paste from screencapture to specific folder in notes.app. I can capture the image, switch to the notes app and even create a specific note in a specific folder with text but cant understand how to paste the clipboard captured image into the note. Here is the current state of the macro
I haven't really used the Apple Notes app (much prefer Evernote), but assuming that the above macro/script opens the Notes document, and the cursor is in the body of the Note, you could just add these KM Actions:
I thought at that initially but couldn’t find a keyboard/menu way top focus the folder pane in order to issue the keystroke down method. Also seemed like AppleScript would be more robust
AppleScript is very robust -- almost never fails/crashes. I suppose you meant "more powerful". If you want more power, use AppleScriptObjectiveC.
Give this script a try. It works for me.
tell application "Notes"
activate
set oNote to make new note at folder "temp.notes" with properties {name:"this is a test 6", body:"and more text with image below."}
show oNote
delay 0.5
tell application "System Events"
key code 125 using command down -- Go to bottom of Note
key code 36 -- RETURN key (to go to next line)
keystroke "v" using command down -- Paste
end tell
end tell
I use Notes a lot, and I've automated its use with KM.
You said you "couldn’t find a keyboard/menu way top focus the folder pane in order to issue the keystroke down method". I found a way. Just close and re-open notes. It's always defaulting to the Folders pane when I do that, resulting in Down Arrow always working. Another way I found is to click in the folder pane, which for me means clicking on the iCloud word at the top of the pane. Do those methods not work for you? If not, we may be able to find other methods. I found another way that uses only keystrokes if you insist on such a method. What you probably want is a menu item that guarantees a correct context switch, but I didn't find one of those.
You had me at "scriptable". So I went to the app store. There were several things that bothered me:
Many reviews on the App store site said that it "crashed a lot";
They have a "full version" that costs C$100/year and they don't explain what their "entry version" is missing;
They insist on taking my email address for the entry version;
They don't tell me what country my notes are stored in on their cloud storage or whether my notes are encrypted in transit;
They asked me for permission to place cookies on my computer but even before I clicked "OK" they had already put a cookie on my computer. That's disrespectful. I even declined to accept their cookie policy but the cookie stayed on my computer. So why do they even bother asking if they ignore my answer?
They are definitely doing all the wrong things if they want my business.
Insert whichever date format you want at the top of the script:
set dateStr to date string of (current date)
-->Friday, September 13, 2019
set dateISOStr to text 1 thru 10 of ((current date) as «class isot» as string)
-->2019-09-13
then just use the appropriate AS Variable for the "name" or "body" field:
set oNote to make new note at folder "temp.notes" with properties {name:dateISOStr, body:""}