Partial Issue With a Notes Macro, After Upgrading to Ventura

I am getting a partial issue with a Notes macro, after I upgraded to Ventura.

The macro starts Notes (if it is not active) or toggles the visibility of Notes (if Notes is already active):

image

When the above is triggered, Notes activates well, but it not hide on a second trigger.

The same macro works well in other apps, like Safari, Apple Mail, Music and TaskPaper.

Troubleshooting ideas?

Hey Jim,

Try this, and see if it does the job:

tell application "System Events"
   tell (first process whose frontmost is true)
      if its name = "Notes" then
         set its visible to false
      else
         tell me to activateNotes()
      end if
   end tell
end tell

on activateNotes()
   tell application "Notes" to activate
end activateNotes

-Chris

1 Like

Hi @ccstone!

Thanks for your effort!

After I posted the above, I did go back to using an AppleScript that I created before I got Keyboard Maestro:

tell application "System Events"
	if not (frontmost of application "Notes") then
		tell application "Notes" to activate
	else
		if frontmost of application "Notes" then
			set visible of process "Notes" to false
		end if
	end if
end tell

It does work, so I have a working solution.

Thank said, does @peternlewis know why the original macro stopped working when I upgraded to Ventura?

Did Apple do something crazy to Notes?

This action seems to work fine with Notes on my test Ventura Mac, so it's hard to suggest what the issue might be.

I thought maybe Notes had moved location (like Safari did), but it doesn't seem to be the case.

Perhaps something else is related, maybe the trigger, maybe some other things happening on your Mac? Maybe your Mac just wants a restart (did you restart after the Ventura upgrade? I always recommend restarting a second time after any upgrade to ensure a properly clean system).

2 Likes

Fair enough—thank you for your input.

Yes, I restart at least once a day. That has not helped.

I'll stick with the AppleScript for now.