Linking to the Application, not a document in the application

I have to ideals that would help me a lot:

  1. Currently, Hook tries to create links between documents in an applications, but I want to link documents/web sites/etc to a particular application. So, for instance, I make a link between Kitty (a terminal emulator) and it’s website, I can use Hook to quickly get to that website to find information about the program.

  2. It would also be nice to Hook applications that I use together a lot in a group to allow for quick navigation between them. Note going to a particular document in the application, but just switching to or opening an application that I often use together. I get something similar to this using Workspaces, but the Hook method would be much simpler.

A part of this is already possible — you can Hook the application file to the website. When you’re on the website you will have a link that launches the application. When you want to find the website you’d select the application file instead of launching the application.

Linking between running apps isn’t easily doable — you could have a file open in each app that you Hook together and always leave that file loaded in the app just for switching? I know that’s not what you’re after, but thinking about what’s currently possible.

Yes, but if the application doesn’t have scripts to get the document name, then you can’t link to it. As my example: I’m learning to use the Kitty terminal program, which will never be Hook enabled since it isn’t a document based program. I want to use Hook to attach the location of the website to quickly jump to instructions on how to use it and also my notes about the terminal program on my computer. This would be just a small change, but would add a lot of help context. I’m often hunting my notes on how to use programs that this would help solve.

Just think beyond just document applications. I could just use the program switcher <ctrl>-tab, but then I have to weed through all the unrelated programs also. Able to Hook between the would be so much faster.

1 Like

If you never want to Hook to documents in an app, then you can make this work by adding a script for it that returns the application file URL. You’d have to set it up for each app individually.

Again, far from ideal, but possible with current version.

Is the file URL the format: file://<path to file> ?

So, for Kitty, it would be file://Applications/kitty.app.

I just tried it and I still can’t link with it. It says there are no linkable items for it. Does Hook need to be restarted?

1 Like

Select the application in Finder, bringing up Hook, and copy link. Then in the Get Address script return that link you just copied.

You’ll need to return a name in Get Title too.

That will work on a case by case basis, but it should be easy to use AppleScript to get the title and address of the foreground application, then you can copy the same script for multiple applications.

Since the address is Hook specific (ie: hook://file/YHdLtdMUo?p=Ly9BcHBsaWNhdGlvbnM=&n=kitty.app for the Kitty.app terminal), how would I generate that in AppleScript? I think I’m not following your last paragraph.

I got it to work with the create link. Thanks.

1 Like

You don’t need to give Hook the hook:// URL (though that works), you can pass it the file URL. For example, look at the in-built Finder integration script — here’s a modified version I used: