# Linking to the Application, not a document in the application

**URL:** https://discourse.hookproductivity.com/t/linking-to-the-application-not-a-document-in-the-application/585
**Category:** Hookmark Feature Requests
**Created:** [July 22, 2019, 7:36am UTC](https://discourse.hookproductivity.com/t/linking-to-the-application-not-a-document-in-the-application/585 "2019-07-22T07:36:52Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![raguay](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/raguay/32/237_2.png) [@raguay](https://discourse.hookproductivity.com/u/raguay)
#### Post date: [July 22, 2019, 7:36am UTC](https://discourse.hookproductivity.com/t/linking-to-the-application-not-a-document-in-the-application/585/1 "2019-07-22T07:36:53Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![stevelw](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@stevelw](https://discourse.hookproductivity.com/u/stevelw)
#### Post date: [July 22, 2019, 6:07pm UTC](https://discourse.hookproductivity.com/t/linking-to-the-application-not-a-document-in-the-application/585/2 "2019-07-22T18:07:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![raguay](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/raguay/32/237_2.png) [@raguay](https://discourse.hookproductivity.com/u/raguay)
#### Post date: [July 23, 2019, 2:07am UTC](https://discourse.hookproductivity.com/t/linking-to-the-application-not-a-document-in-the-application/585/3 "2019-07-23T02:07:45Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![stevelw](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@stevelw](https://discourse.hookproductivity.com/u/stevelw)
#### Post date: [July 23, 2019, 6:00am UTC](https://discourse.hookproductivity.com/t/linking-to-the-application-not-a-document-in-the-application/585/4 "2019-07-23T06:00:33Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![raguay](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/raguay/32/237_2.png) [@raguay](https://discourse.hookproductivity.com/u/raguay)
#### Post date: [July 23, 2019, 7:12am UTC](https://discourse.hookproductivity.com/t/linking-to-the-application-not-a-document-in-the-application/585/5 "2019-07-23T07:12:23Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![stevelw](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@stevelw](https://discourse.hookproductivity.com/u/stevelw)
#### Post date: [July 23, 2019, 4:48pm UTC](https://discourse.hookproductivity.com/t/linking-to-the-application-not-a-document-in-the-application/585/6 "2019-07-23T16:48:15Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![raguay](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/raguay/32/237_2.png) [@raguay](https://discourse.hookproductivity.com/u/raguay)
#### Post date: [July 24, 2019, 2:56am UTC](https://discourse.hookproductivity.com/t/linking-to-the-application-not-a-document-in-the-application/585/7 "2019-07-24T02:56:15Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![stevelw](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@stevelw](https://discourse.hookproductivity.com/u/stevelw)
#### Post date: [July 24, 2019, 4:50am UTC](https://discourse.hookproductivity.com/t/linking-to-the-application-not-a-document-in-the-application/585/8 "2019-07-24T04:50:02Z")

</div>

> [@raguay](#):
>
> 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?

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:

> [@PDF Expert integration scripts](https://discourse.hookproductivity.com/t/pdf-expert-integration-scripts/457):
>
> I’ve seen some interest in PDF Expert integration. Here’s my script to integrate — ideally PDF Expert would add AppleScript support. I don’t use PDF Expert myself and haven’t done much testing, so do let me know if this does what you want. Get Name tell application "System Events" get name of first window of process "PDF Expert" end tell Get Address tell application "System Events" tell process "PDF Expert" if enabled of menu item "Show in Finder" of menu 1 of menu bar item "File" of menu…
