Using on open location this_URL in Running Application?

I currently have NSMenu items triggering action handlers from a running application.

Is there a way to trigger the same action handlers using on open location handler or another method via a custom url and ApplescriptObjC in the same running application? I haven’t had any success with my attempts, as I would prefer not to have a different helper application and it doesn’t work if the app is already running.

Is NSUserActivity a possibility? I haven’t been able to find anything on using it in running application to detect custom url.

It’s not exactly clear what you are asking.
It would be helpful if you explained a bit more.

I’m not sure if you referring to a custom URI.
Ie things like Spotify have a custom URI when you click on the link it opens the App rather than a “web link”

You have to define your custom URI in your info.plist

And then handle that URI in your app.
You could add different path additions to the URI and then when you app receives the URI , get that last path, segment and the call your methods based on that.

IE
URI: MyApp:Open

MyApp:Open:Menu1
MyApp:Open:Menu2
MyApp:Open:LogIn

Check out: