Finder feature request

Hi. Love this app. I have linked various Finder folders using Hook. I have a folder window open. I invoke Hook dialog. Links to other folders appear. I select one and hit enter. The folder opens in a separate finder window. I would like it to open in the same finder window, either replacing the existing directory or opening in a new tab. I am not sure the latter is possible.

But with LaunchBar, for example, when I hit enter on a folder I want to open, it replaces the directory in the current finder window rather than open a new window, and there is an option to toggle that functionality. It is frustrating to open a bunch of new finder windows as I am moving among my Hook’ed links.

1 Like

I see one of the devs has ‘liked’ your suggestion, which implies that may be on/have been added to the roadmap.

In the meantime though, if you know how to do it in AppleScript or JavaScript then you can add this feature yourself by editing the Finder ‘open’ script in Hook. I don’t have the time to do it myself at the moment, but if you wanted to try then I’m happy to give you some pointers (as I’m sure other forum members will).

Hook is very adaptable to different workflows.

I hadn’t thought of that and I’ll take a look at the scripting and see if I can figure it out. If I run into trouble I’ll take you up on your offer! Thanks very much!

Ok, this seems to be the key part of an Applescript:

    property the_path : "/PATH TO FOLDER/"
set the_folder to (POSIX file the_path) as alias
tell application "Finder"
activate
if Finder window 1 exists then
set target of Finder window 1 to the_folder
else
open the_folder
end if
end tell

But I am at a loss as to how to get the path of the linked folder into the_path.

B

You can get the URI passed from Hook with $0.

To get Hook to use your open script you’ll need to add a unique scheme name to the box in the script editing window. Then you’ll need to edit the Get Address script to prefix that scheme at the start of the URI. Then any new links you generate in finder will use your Open script. Old links will still work but will just use the default Open behaviour.

More info on editing Hook scripts/using schemes

Steve,

I came up with the following, which did not work.

image.png

image.png

You’ve got file:// instead of hook:// in the Get Address script.