URL (and Title) from Orion (subroutine) [REDUNDANT]

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! :slight_smile:

Orion Browser by Kagi...

Huh – NO AppleScript support!

Yuck!

Period.

Based on your feedback, V. 1.1 of the macro is in development. It consists of an alert saying "no!". :upside_down_face:

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.

2 Likes

URL (and Title) from Orion (subroutine) V. 1.01

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.

URL (and Title) from Orion (subroutine).kmmacros (10 KB)

1 Like

Simple enough to fix -- start the macro by getting the current app and then choose whether or not to switch apps at the end:

(Editing "Orion" to match the reported string, obvs...)

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! :smiley: 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.