Hookmark is closing my Finder window/tab after creating a link

Here is the context. I have a PDF open in PDF Expert and also have a Finder window open to the folder that contains that PDF. If I select text in the opened PDF and initiate a Hookmark link, a link is successfully created, but Hookmark for some reason closes the Finder window/tab that was open to the PDF. I do not want this to happen. Is there a setting to disable this?

Welcome to Hookmark, @pruppert .

Do you mean you use a shortcut to copy a link?

Thank you

No, I select text in the PDF and invoke a Markdown link from Hookmark’s keyboard shortcut for that in its settings.

Can you change that keyboard shortcut and see if it helps?

Thank you

I changed the shortcut. The same thing happens – Hookmark closes the Finder tab/window that was open to the PDF.

The “Get Address” Script for PDF Editor does that. You can comment out the following two lines in the script(put two dashes before them) or simply take them out.

1.close (get (every window whose id of it is not in openWindows))

2.close Finder window 1

The following sample script just comments out those two lines.

if isEnabled then
		tell application "System Events" to tell process "PDF Expert" to click showInFinder
		delay 0.1
		tell application "Finder"
			set openWindows to id of every window
			set fileURL to URL of (selection as alias)
			--close (get (every window whose id of it is not in openWindows))
		end tell
		
		tell application "Finder"
			--close Finder window 1
		end tell
	end if
	
1 Like

:man_facepalming:

Yep, that fixed the issue. Forgot, I was was relying on the Applescript for PDF Expert. Thank you for the help.