I donāt know about Omnifocus. For Obsidian, do you mean a URL that is in a note, or the URL of the note?
For the former, you could perhaps use the Search using Regular Expression action on the markdown file for the note.
If you meant the URL of a note, read up on URIs from the help section of Obsidianās site, and maybe consider the āAdvanced URIā community plugin.
It wasnāt obvious to me. I take it you just like palettes... or are they particularly relevant to the problem? I think you will get better advice once you have gone into more detail but I hope I have given a relevant idea or two. I do suspect that you might find more focus on what you need to do if you just start a rough macro and see where it leads. Then of course please ask for more specific help.
I was thinking about palette to quickly display all of my current projects and choose the one I want to open. I'll try to build something like that to see if it can answer to my need.
My first need is an easy and quickly way to add a folder to project list. If it's too long, I know I won't use it.
But a KM palette is a palette of macros -- you'll need to make a separate macro for every project and delete the macro when a project is done. Doable, but seems like a lot of unnecessary work.
I'm not a user -- but isn't Omnifocus a to-do list system (and I'm sure that's an insulting over-simplification!)? And one that can group to-dos in projects? From the outside it seems easier to do the project list there -- I believe it also has "views" that would make it easy to see only the relevant projects -- and store the Finder location and Obsidian URL in each project's notes. It should be easy enough to use Omnifocus scripts or a KM macro to set up a "project workspace" by opening the Finder and Obsidian links for that project...
I would take an other approach. The problem has two sides:
Collecting the URL's
Launching the URL's
For the collection I would set up three different KBM macros, one for each application you want to support. All 3 of them would use the same shortcut and only be active for the given application. As an example the macro when fired on OmniFocus would copy the item link using the Menu "Edit -> Copy Item link", when fired on Obsidian it would have to do a right click on the selected item and then use the menu item "Copy Obsidian URL", etc. KBM is very capable of executing these actions.
For the launching, in theory it would be possible to have the above capture scripts also create a keyboard macro so the URL's could be selected using a palette, but as others said not very practical. I suggest you take a look at the article Pick List which presents a list to the user to select from. A possible approach could be that the capture scripts, write (append) the collected URL's to a file, either one big for all your URL's or one for each application you want to support. Your launch script would read the file and present it in the pick list after which you can launch the required application.
I think for now I will only use finder shortcuts. So I tried to see how I can open finder location from palette. Itās pretty easy.
But the problem is to add or remove finderās path from the palette. Do you know a way to dynamically change the paletteās content (so the macro list) ?
Ok from other topics Iāve found a way with a .txt file and prompt list.
One drawback is that it display a list of truncate foldersā path as I use it for remote server access.
I would like to add a ānameā for each path. Maybe itās possible to use regex to only have a part of the path ?
The second drawback is when I want to delete path from the list. Apparently I must edit manually the text file, I canāt remove the line from KM. Do I understand correctly ?
Maybe I can use a dictionary instead of text file ? That way I can add/remove from the dictionary from KM and add a name for the path ? But I donāt find a way to list dictionary entries in prompt list.
This and the other things you are asking are all possible with Keyboard Maestro and Prompt from List is very adaptable.
But the simplest way to make a dynamic palette that is intuitive is to make use of Keyboard Maestro's Conflict Palette feature.
If two of more Macros have the same hotkey and are active, pressing that hotkey will bring up a palette that allows you to choose which Macro to run. I use this with finder folders/websites/Apple notes/files that I use a lot.
In my case pressing āā„āD brings up the below conflict palette (as all these Macros have this same hotkey).
To go to the folder or website I want I either click it in the Palette or type the blue highlighted letter. That first blue symbol at the head of the Dropbox Macro, is actually just a "space" that is the first letter in the Macro's name. Hitting the spacebar while this palette is up takes me to my Dropbox folder. Likewise the Return symbol is the first letter in the Desktop Macro's name. Hitting Return while this palette is showing, takes me to my Desktop.
To remove an item from appearing on the Palette (if I no longer need quick access to that item) I hold the Option Key while clicking the item and that takes me straight to the actual Macro where I just disable it so it no longer shows (I disable rather then delete the Macro in case I want to add it again).
As I use this system constantly I have a Macro to create the Macros... but it's still pretty fast to set up without any special Macro.
Ok maybe Iāve found a way easily delete project. I use Search and Replace to remove the path.
The only thing I donāt achieve is to perform a search and replace for the path but also for the friendly name. %Variable%Listings% only return the path, not the friendly name.