PURPOSE
This macro will open the Apple Notes app and float one or more notes (i.e., open each note in a separate window). Thus it provides a convenient method to access frequently used notes.
SETTINGS
Note settings for this macro are entered in variable local_Favorite_Folders_Titles. For the required syntax, see the macro Comment Syntax Description—SETTINGS (Notes).
Window position settings are entered in variable local_WindowPositions_x_y_w_h. For the syntax, see the macro Comment Syntax Description—SETTINGS (Windows).
HOT KEY TRIGGERS
• ⌥⇧N : primary Hot Key trigger. This macro processes the SETTINGS (Notes) normally (same as if it was triggered from the KM Editor, a palette, etc.). This Hot Key can be freely changed.
• (any modifier combination)+n, where n is any single character, except N (e.g., ⇧⌘W, ⌥⇧⌘3, ⌃⌥⌘Q) : These optional secondary Hot Keys will normally be matched (in the three examples W, 3, Q) to prefixes in the SETTINGS (Notes) variable. If no match is found, this macro functions as if it was triggered from the Keyboard Maestro Editor.
TRIGGERING
If this macro is triggered directly it will use the SETTINGS (Notes). If it is triggered by another macro* (a.k.a. a caller), it will use the SETTINGS (Notes) provided by that macro.
*To ensure that a calling macro is structured properly, duplicate macro Float Specified Apple Notes CALLER TEMPLATE and customize the duplicate as needed.
ACKNOWLEDGEMENTS
This macro includes an AppleScript handler derived from a template created and shared by @JMichaelTX: What is Best Practice for Handling Script Errors in Execute Script Action? - Questions & Suggestions
TESTED WITH
• Keyboard Maestro v10.1.1
• Monterey, v12.4/MacBookPro16,1
• Mojave 10.14.16/Macmini6,2
• High Sierra 10.13.6/iMac11,1445
VERSION HISTORY
expand
1.0 - This was based off Float Selected Apple Note with the following enhancements:
a) open one or more notes directly (with $> prefix)
b) open a specific note with a Hot Key Trigger
c) trigger this macro from a calling macro
2.0
a) Added SETTINGS for window positions.
b) Accommodates n: prefixes in the SETTINGS (Notes) from a calling macro.
2.1
a) Set icon to the Apple Notes app.
b) Updated parsing of text lists.
c) Bug fix: n: was not properly detected unless the line also included $>, i.e., n:$>
2.2
a) Changed primary hot key trigger from ⌥⌘N to ⌥⇧N.
b) Changed secondary hot key triggers from ⌥⇧⌘1 to ⌃⌥⇧1 and from ⌥⇧⌘2 to ⌃⌥⇧2.
c) Included minor performance improvements.
d) Included minor adjustments to window position and size.
e) Fixed a few typographical errors in the comments.
f) Updated TESTED WITH.
2.3 - Modified to accommodate macOS Ventura (v13.x). In this version the Notes app menu item Window>Float Selected Note was changed to Window>Open Note in New Window.
DOWNLOAD Macro File:
Float Specified Apple Notes.kmmacros (195 KB)
Note: This macro was uploaded in a DISABLED state. It must be ENABLED before it can be run. If it does not trigger, the macro group might also need to be ENABLED.
Float Specified Apple Notes can be triggered (a.k.a called) for another macro. The following is a template that can be duplicated and modified as required.
DOWNLOAD Macro File:
Float Specified Apple Notes CALLER TEMPLATE.kmmacros (21 KB)
Note: This macro was uploaded in a DISABLED state. It must be ENABLED before it can be run. If it does not trigger, the macro group might also need to be ENABLED.