Quickly Make an Apple Note With Note on Top

Hey guys...

New to Mac. Bought Alfred app first, and now KB...so please pardon any ignorance :slight_smile:

I used this from the forum here to get an Apple Note created, but I still have to find the actual note.

Is there a way to make the actual note window appear on top of everything, front and center in the middle of the screen or smth so I can begin typing immediately?

Trying to recreate the quick note taking experience that I was using with Notepad++....fast & simple.

TIA and looking forward to learning + giving back.

Welcome aboard! I'm not sure if this will help or not, but you can use the Activate a Specific Application action to start Notes, or bring it to the front if it's already running.

Hey Tommy,

See this:

Apple Notes - Make Note Macro (v9.2) - #7 by ccstone

-Chris

Thanks Chris...yea that's the one I'm using now (thank you btw)...

But I'd simply like to bring the individual note to the front by itself so I can type whats needed, and then just close it out...vs having to look for the note etc.

Not sure if that's possible, so figured I'd ask.

Edit: Just added this to the end. Kinda does what is needed, so I guess good enough...

Try this one too:

1 Like

Hey Tommy,

You don't have to look for the note (see “show newNote)”:

tell application "Notes"
   activate
   set newNote to make new note
   show newNote
end tell

The problem with this is that AppleScript does NOT position user-focus in the note, so you can get on with editing...

You're better off using plain old Keyboard Maestro actions:

Make New Note v1.00.kmmacros (6.5 KB)

You can do this with AppleScript, but the behavior of the new note is a bit different. Normally a new note's first line is formatted in title-format, but when created with AppleScript it's body-format.

--------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2021/08/05 03:43
# dMod: 2021/08/05 03:43 
# Appl: Notes, System Events
# Task: Make a New Note and Focus for Editing
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Notes, @System_Events, @Make, @New, @Note, @Focus
# Test: macOS 10.14.6 & Notes 4.6
--------------------------------------------------------

tell application "Notes"
   activate
   set newNote to make new note
   show newNote
end tell

tell application "System Events"
   tell application process "Notes"
      tell window "Notes"
         tell splitter group 1
            tell splitter group 1
               tell group 2
                  tell scroll area 1
                     tell text area 1
                        set focused to true
                     end tell
                  end tell
               end tell
            end tell
         end tell
      end tell
   end tell
end tell

--------------------------------------------------------

-Chris

1 Like

Please forgive me for jumping in. @ccstone 's AppleScript inspired me to try it.

But I get this error:

Screen Shot 2021-08-05 at 2.42.32pm

Ideas?

Hey Jim,

What version of macOS?

Use UI Browser or my Window Analysis Tool:

Front Window Analysis Tool Using AppleScript System Events (List UI Elements)

To discover the proper hierarchy.

-Chris

Hi Chris,

Thanks for the response.

  • Mac OS version 11.5.1 (20G80)
  • Notes Version 4.8.1 (1872)
  • Keyboard Maestro Version 9.2

I will try your tool, as I don't currently have the budget for UI Browser.

This works great. I have made a PopClip like Macro Palette in KM to process text selection. See:

2021-08-06 11-51-24.2021-08-06 11_53_07

2 Likes

It has a demo period.

Thank you for this!

So just to clarify, there's no way to combine your Apple Notes - Make Note Macro with the user-focus on the new note?

Made a quick vid (1:09) just to make sure not missing anything here.

Thank you for all your help :slight_smile:

Hey Tommy,

You didn't really specify this clearly in your initial request.

The original macro already has code to show the note – you just have to uncomment it in the AppleScript.

When I wrote it I was using macOS 12.14.6 Sierra, and show was not available in the Notes app on that system – hence the comment in the AppleScript:

# Requires Mojave (maybe High Sierra) or later.

Give this macro a try.

Make New Apple Note with Content and Bring to Front for Editing v1.00.kmmacros (8.5 KB)
Keyboard Maestro Export

The code to move focus to the editing panel may not work past Mojave without adjustment.

-Chris

2 Likes

You are the man! The cursor starts above the NoteTitle instead of after the NoteBody, but I can live with that.

Thanks so much Chris!

1 Like

Indeed, now this is generating an error right at the finish. Any suggestions on correcting the macro fail for the last series of "tell"?

Hey Jay,

Welcome to the forum!   :smile:


I don't have good access to any version of macOS later than Mojave at the moment.

This might work on the Big Sur version of Notes.app.

tell application "System Events"
   tell window "Notes"
      tell splitter group 1
         tell splitter group 1
            tell group 1
               tell scroll area 1
                  tell text area 1
                     set focused to true
                  end tell
               end tell
            end tell
         end tell
      end tell
   end tell
end tell

If not you'll have to try to figure it out for yourself:

See this thread:

Front Window Analysis Tool Using AppleScript System Events (List UI Elements)

See UI Browser.

-Chris

1 Like