How can I call the URL scheme of another app from a plug in/a custom command/the dev tools console?

Hi, I want to write a custom command that creates a Things project from a note in Obsidian.

I could not find a way in Applescript/JXA to get the path to the current note in Obsidian.
So I set out to write it as a custom command in Obsidian (using this command as a starting point). But I have no experience with Electron and couldn’t find a way to open an external url scheme.

(In the Electron documentation I found shell.openExternal but shell is not available in the dev tools console.)

Does anyone know how to do it or can give me pointers what to google?

1 Like

I have no experience with any of this, just wanted to say good luck!

I also use Things and this would be a nice option. My current workflow to add a task while in Obsidian is to use the quick entry shortcut, which pulls up a little window for a new task. I don’t know how (or if I can) add a link to the markdown file in the task which will open in Obsidian though.

I don’t think this is easy without the API. Fortunately, the API was just launched in alpha today. See the release notes for 0.9.7—and let the devs know if it doesn’t expose what you’d need to do this!

Oh yeah, I managed to open Things :partying_face:

Now I need to spend some time to learn some javascript and the Obsidian API to extract the data from Obsidian and generate the corresponding url scheme call.

When/if I am done, I will share my plugin here.