MACRO: Float Specified Notes, v3.3

Inserting that script into Script Editor worked! When I ran the script, it opened Notes and then selected TO DO LIST.

You inspired me to try a bit of troubleshooting. I created a fresh new user on my MBP, synced my iCloud Notes with that user, and tried the full macro with the "TO DO LIST" string. Worked perfectly.

I went back to my regular MBP user account and tried the following:

  1. booted in safe mode - No luck.
  2. uninstalled KMMaestro and all supporting files in Library/Application Support, then reinstalled and installed just the Float Apple Notes macro. - No luck.
  3. reset Mac keyboard shortcuts to the default settings in case of conflicts. - No luck.

So incredibly odd! Any thought what sort of application that Safe mode wouldn't disable that could be causing a conflict?

Nice troubleshooting steps. Good to hear!

Again, good troubleshooting. That eliminates many possible culprits.

It is, but now I'm more confident it's a Keyboard Maestro /AppleScript/Notes privilege issue. The Keyboard Maestro Developer, @peternlewis, might be able to help.

Peter, why would this AppleScript work in the Script Editor, but not in a Execute an AppleScript action?

tell application "Notes"
	activate
	tell (get every note whose name contains "TO DO LIST")
		set theNote to its first item
		show theNote -- also selects the note
	end tell
end tell

Beats me, it worked fine for me in Ventura when I just tried it - it asked for permission to control Notes, and then selected the specified note (I changed it to a title I had).

So you'll need Automation permission for Notes, but other than that it worked fine in my test.

It could depend on the kind of note, or the macOS version or some other issue, but I would need more information about when the failure happens and if it happens for other people before being able to suggest anything further.

Obviously, as with any Execute AppleScript failure, turn on include errors and display the results in a window so you can see what is being reported.

1 Like

Thanks, @peternlewis!

Ah, I bet that's the problem. @AppleTooPlus, use System Settings > Privacy & Security > Automation > Keyboard Maestro and check that the Notes switch is on.

If it's currently off, turn it on. If it's on, turn it off and then back on.

Thanks! I assumed that Engine.log wouldn't have anything since @AppleTooPlus didn't mention that, but maybe notifications were also suppressed (e.g., with Do Not Disturb or some other Focus Mode).

@AppleTooPlus, if Engine.log errors do exist, you'd see something like this:

Aside: With respect to the Engine.log, you might find this macro useful: Engine.log Tool

@_jims That was it! The Notes switch was 'off' under those settings. Turned it on and voila. Incredible. Thank you so much for persevering on this and for your fabulous macro! And shout out to @peternlewis for your brilliant app and for helping solve the mystery. Best tech support forum ever.

3 Likes

Great to hear. Thanks for the update.

Yes, thank you @peternlewis!


@AppleTooPlus, I've shared another Notes app macro; you might find it useful: Note Picker