A better Get Address script for Marked… maybe

If you hook a document from Marked, you might want it to open back up in Marked when accessed again. If so, use this as the Get Address script:

tell application id "com.brettterpstra.marked2" to get "x-marked://open/" & path of front document

Also, I’m wondering if there’s any elegant method to deal with the bundle ids being different between the Mac App Store, Paddle, and Setapp versions. The app title even changes (“Marked 2” on MAS and Paddle, “Marked” on Setapp), so that’s not an option. Would almost have to do a little logic ladder and hope the user doesn’t have two different versions installed. I bring this up because I assume Marked isn’t the only app with this issue…

1 Like

Thanks for the extra script!

Later, we wish to provide users with option to have multiple different sets (bundles) of scripts for the same app ID. (So that users can choose between them with a UI widget showing option names (one set per supported natural language), rather than needing to copy/paste scripts. CogSci Apps would sometimes share multiple bundles per app ID.) EagleFiler is an example where this would be handy ( EagleFiler:// URLs rather than hook://file for some users).

Currently there’s no more elegant way. Hook needs one script bundle per app ID.

I’ve logged this internally as a feature request. Would be handy for CogSci Apps too!

Later, we wish to provide users with option to have multiple different
sets (bundles) of scripts for the same app ID. (So that users can
choose between them with a UI widget showing option names (one set per
supported natural language), rather than needing to copy/paste
scripts. CogSci Apps would sometimes share multiple bundles per app
ID.) EagleFiler is an example where this would be handy (
EagleFiler:// URLs rather than hook://file for some users).

That would be super handy, assuming it was something I could set as a
preference and not deal with a popup menu every time I create a link!
(Which I assume was the plan :)).

Currently there’s no more elegant way. Hook needs one script bundle
per app ID.

Not sure how I’d handle it, but it would be possible to have a simple
dropdown in the preferences to select between multiple versions. It
could either be just a list of available known versions, or it could be
“smart” and detect multiple installs on the same system, only being
visible if there were more than one bundle ID detected on the system.
Would need some way to reference it from the attached scripts, though in
most cases “tell frontmost app” would probably work…

yep, that’s what we’re discussing. It would be in Hook > Preferences > Scripts > [the particular App’s set of script bundles].

thanks very much for all these contributions.