oops, I hadn’t read down so far when I posted my comments above on same.
well, as we’re on the topic of
hook://file// URLs, another distinctive feature of course is that
hook://file// can be shared with others (e.g., in Git, SVN, Dropbox, etc.). You can even email the file to someone along with a link. They can move the file around and still use the link. Those cases require the last part of the pathname to be the same. We tweak the algorithms over time to optimize robustness. Hook also supports deep linking of PDFs, so you can point deeply into the PDF (interchangeably with Skim, PDFpenPro and soon Adobe Acrobat). etc.
Same here, not sure what difference there is between the uuid scripting option, and generating these date specific ones, other than that you can sort the latter?
I had to delete the path on the second line to make this work on my M1 MacBook Pro. Just FYI and for anyone else having trouble.
I guess the swift way will also work
can someone confirm?
#!/usr/bin/swift import Foundation print(UUID().uuidString)
(Off topic perhaps but am I picking up the right drift - that Swift can be used as an inline scripting language?)
Yes. One of the reasons that I would love to know swift. You can use it as a 'shell script’ as long as you start with the proper shebang, as shown above:
Right. It was the “Showing Of The Shebang” (movie title?) that got me asking. My assumption is that something (not sure what exactly) interprets or compiles the script. Might not run fast, of course.
This is a great idea and a useful Alfred workflow. Unfortunately, when I click on the supplied GitHub link a 404 error is returned. Any thoughts? Thanks again for sharing.
Looks like he rearranged a bit:
Yes, sorry about that. Thanks for putting the new link in
Sorry if this was already mentioned, I’m curious about your use of different strings to trigger the macros. Would it not be simpler (no strings to remember) to put the different macros into groups that are only active when that app is active/at the front?
Obsidian group > obsidian macro (trigger w command option c)
evernote group > evernote macro (trigger w command option c)
Finder group > finder macro (trigger w command option c)
I’m rather new to KM and starting to structure it like this. I when I can’t remember a command, I trigger “show all (of this apps) macros in a pallet” with command option alt leftclick.
The main advantage of a string is that you can “expand” them whenever you’re typing them.
Say you’re writing a Task in Things and want to insert the link to the message currently open in Mail, then…
- Keep editing the task in the app and just type the string
;mlink(in my case).
Then the link will just show up wherever you’ve typed (will work on other apps as well). It will work In whatever destination app you choose (e.g. Obsidian, Numbers, Calendar…).
- Open Mail
- Use the hotkey to copy the link
- Open Things
- Move the cursor to where you want to insert
So yeah, the hotkey for copying the URL will be the same on this approach, but its not as fast as the string for everyday use. And if you stick to a scheme such as my
;<app initial>link (as in
;mlink for Mail,
;tlink for Things,
;slink for the currently opened Safari tab,
;flink for Finder,
;olink for Obsidian, and so on…)
Ooooooohhhh I see what you’re doing. Im used to automations working in the background, looking things up, etc, but this is more like the user directly grabbing data from apps that aren’t active… Kinda “next level”, huh
Thanks for explaining!