Is there a way to create a shortcut in Finder to an Apple Note?
Solution 1:
I think you will like this following AppleScript solution.
STEP 1: Save this following AppleScript code as a Script File to your /Users/YOUR SHORT NAME/Library/Script Libraries/ folder. (with the name “Make Link To Note Library.scpt”). Just compile the script and save it and don’t even bother running it from Script Editor.
This following AppleScript will be used as, what is known as a “Script Library”.
property destinationSuffix : "Contents/Resources/applet.icns"
property iconFile : missing value
property thisApp : missing value
property noteName : missing value
if iconFile = missing value then changeMyIconToNotesIcon()
if noteName = missing value then chooseNote()
try
tell application "Notes"
activate
show note noteName
end tell
end try
to changeMyIconToNotesIcon()
set iconFile to path to resource "AppIcon.icns" in bundle ¬
(path to application "Notes")
set thisApp to path to me
set replaceThisIcon to POSIX path of thisApp & ¬
destinationSuffix as string
do shell script "cp " & quoted form of POSIX path of iconFile & " " & ¬
quoted form of replaceThisIcon & " ; touch " & ¬
quoted form of POSIX path of thisApp
end changeMyIconToNotesIcon
on chooseNote()
tell application "Notes" to set noteNames to name of notes
activate
set noteName to (choose from list noteNames) as text
return noteName
end chooseNote
STEP 2: Save this following AppleScript code as an application, with the name, for example “NOTES Make Link To Note Template.app”
property loadedScript : load script alias ¬
((path to library folder from user domain as text) & ¬
"Script Libraries:Make Link To Note Library.scpt")
run loadedScript
Taking this concept one step further, and making life much easier for everyone planning to use the code in my solution. Instead of copying and pasting the code from STEP 2, into a new Script Editor document and saving it as an application etc. , every time you want to create a “Direct Link To A Specific Note” , This following STEP 3 should make the process seamless.
STEP 3: Save this following AppleScript code as an application, with the name, for example “Make Link To Note CREATOR droplet.app”
Now that we’ve created the Script Library
file "Make Link To Note Library. scpt”, from STEP 1’s Instructions, we can access its handlers and their commands, directly in this code by inserting the use
command at the top of this following script. This line set noteName to (notesLibrary's chooseNote()) & ".app”
is an example of how to utilize a command from a Script Library file.
use notesLibrary : script "Make Link To Note Library"
use scripting additions
on open theFile
appletFileIsAcceptable(theFile)
activate
set saveToFolder to choose folder with prompt ¬
"Save Your New \"Link To Note.app\" To Which Folder?" multiple selections allowed false ¬
with invisibles and showing package contents
set noteName to (notesLibrary's chooseNote()) & ".app"
tell application "Finder"
set duplicatedApp to duplicate item 1 of theFile to saveToFolder
set name of duplicatedApp to noteName
open (((saveToFolder as text) & noteName) as alias)
reveal (((saveToFolder as text) & noteName) as alias)
end tell
end open
on appletFileIsAcceptable(theFile)
tell application "System Events" to if name extension of ¬
item 1 of theFile ≠ "app" then return -- decide if theFile is acceptable
end appletFileIsAcceptable
In Finder, drag your new created Script Editor applet from STEP 2. directly onto the icon of the Droplet from STEP 3. This will create a duplicate of the”Template.app” to a folder of your choosing and name it to the name of the chosen Note and then launch it automatically. When the process is complete, the new “Go To Specific Note.app” will be completely configured and revealed in Finder
Solution 2:
In Notes app, add a collaborator, and share the link with yourself. Copy that iCloud link and open it in a web browser. No need to sign in. We just care about the URL.
(If you can't share the note due to icon being disabled, see https://support.apple.com/en-in/guide/icloud/mmc0cd6c83/icloud)
In the address bar, grab the padlock icon and drag and drop it in Finder/ Desktop.
Opening that .webloc file will open the note in the Notes app.
webloc file is just a plist:
cat ~/Desktop/note.webloc
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>URL</key>
<string>https://www.icloud.com/notes/UUID_OF_MY_NOTE</string>
</dict>
</plist>