2023-05-05 Following improvements to Applescript support in Orion, this macro is redundant.
(2022-10-06 Bug fix - please see V. 1.01 in the reply below).
This subroutine fetches the URL of the currently displayed Web page in the Orion Web browser and, optionally, the page’s title. Orion does not yet support enough Applescript to be supported by Keyboard Maestro’s built-in methods. This is a hacky solution that I find workable.
Pass the following text strings to this subroutine: “yes” if yes, you do want it to fetch the title of the current tab; or any other text value (e.g. "no") if you don’t. The subroutine returns, as a text string, the page title followed by the URL on a new line. The page title will be omitted if the input parameter is anything other than “yes”.
Please see the "Readme" comment at the top of the macro for details.
Why it's a subroutine: I have a macro that calls this and other subroutines for handling various browsers, but that macro is too attuned to my way of working to be worth sharing without a lot of guesswork about other users’ needs.
This macro was written in Keyboard Maestro v10.2. Thanks!
Based on your feedback, V. 1.1 of the macro is in development. It consists of an alert saying "no!".
It's no secret that Orion needs a heck of a lot of development, but it offers a combination of features that makes it useful to me for many of my regular use cases. Every browser I have tried is, IMO, frustratingly deficient in one way or another as well as having their own strengths. I use several in daily use. :-/
I don't think that proper Applescript support will ever come (back?) to Firefox, but the demand for it on this Mac-only browser is known to the developers, so I have some hope. In the meantime, this macro sees me through for what little I need.
This is a bug fix for the version of the macro I tidied up for release here. Activation will now correctly switch back to the previous application from Orion, even when the page title is not required.
Yes, there is an assumption that Orion won't be the front application when this subroutine is called, because that is how I always use it. If this doesn't suit your needs, delete the "Activate Last Application" action.
Yes, thanks for your interest and that would be one improvement to make it more general purpose... but I don't aim at that, the tweaking would never stop and be for little purpose, I think! The subroutine suits my uses as it is, and it's shared here as little more than an idea on file for whenever someone may want to control Orion (e.g. a new enquiry along the lines of Support for Orion browser in "Front Browser" actions and variables).
If the idea ever did appeal to someone, I expect they would want to modify the macro heavily to meet their own needs (which I can't predict) or just start from scratch.