Which macro do you mean? This is going back almost a year...
This one I guess:
Quick Note.kmmacros (80.6 KB)
This was a choice, to leave Notes in the state the macro found it; i.e. running or not running.
Ok, makes sense.
Thanks!
I was having issues creating new notes today, even though I haven't made any changes to it so I went back and re-added some script I had before, adapted it to the new version of the macro and it's working. So this is the new AppleScript (I'm not an AS expert, so bear with me if there are things in there that make no difference or make no sense, but it's working now):
set inst to system attribute "KMINSTANCE"
tell application "Keyboard Maestro Engine"
set noteTitle to getvariable "Local__Title" instance inst
set noteBody to getvariable "Local__Body" instance inst
end tell
set noteTitleHTML to "<h1>" & (noteTitle as Unicode text) & "</h1>"
set noteBodyHTML to "<pre style=\"font-family:SF Pro Text,sans-serif; font-size: 14px;\">" & (noteBody as Unicode text) & "</pre>"
set noteHTMLText to noteTitleHTML & noteBodyHTML
tell application "Notes" to tell account "iCloud"
-- make new note
set newNote to make new note at folder ¬
"Notes" with properties {body:noteHTMLText}
-- get its id
try
id of newSPITENote
on error errorMessage
set ATID to AppleScript's text item delimiters
set AppleScript's text item delimiters to "\""
set theID to text item 2 of errorMessage
set AppleScript's text item delimiters to ATID
end try
end tell
1 Like