Open URL with optional arguments (open Bear note in new window)

I am new to Hookmark (3 days in) and love it!

I use the Bear app a lot and usually work with multiple windows.
And out of the box, hooking files, emails and bear notes together works as brilliantly.

The only annoyance I have is that by using the base x-callback, bear://x-callback-url/open-note?id=123123, the note opens in the main app (replacing the note currently in focus there). To address this issue, one can add to x-callback-url the parameters &show_window=yes&new_window=yes to open the note in a new window.

What is the best way to achieve this?

I have seen that one can add a custom Open Item script. I have tried

set theUrl to "bear://x-callback-url/open-note?id=$0&show_window=yes&new_window=yes"
open location theUrl

However, I misunderstand how Hookmark handles URLs.

Do you have any suggestions for adding optional parameters to an URL?

Thanks.

Just bumping this up. Is there a way to have hook create a link with optional parameters in addition to the id?

Welcome to the Hookmark Forum , @albard , thanks for asking, and sorry for the delay. In principle this should be possible, however currently if "&show_window=yes&new_window=yes” is appended to Hookmark’s x-callback-url, it will be discarded because in Hookmark’s current implementation , Hookmark only tries to get the URL and title from the x-callback-url returned by Bear or other apps using x-callback-url.

So the user will only get bear url like:

bear://x-callback-url/open-note?id=AB94EE81-A2CA-4B1D-8D9D-EAF6CA8B780E-67616-00001257DDBA1E96

Instead of

bear://x-callback-url/open-note?id=AB94EE81-A2CA-4B1D-8D9D-EAF6CA8B780E-67616-00001257DDBA1E96&show_window=yes&new_window=yes

We at CogSci Apps definitely should revisit this and better document this kind of thing.We’re trying to keep to our current list of Hookmark 5.0 issues on which we are working. But would like to get to additional parameters soon after. Thanks for bring it up ! We are aware and in tune with the fact that Bear 2.0 is in development :wink:.