# Deep Linking Hook

**URL:** <https://discourse.devontechnologies.com/t/deep-linking-hook/69403>\
**Category:** DEVONthink\
**Created:** [February 5, 2022, 12:34am UTC](https://discourse.devontechnologies.com/t/deep-linking-hook/69403 "2022-02-05T00:34:47Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)\
**Post date:** [February 8, 2022, 9:00am UTC](https://discourse.devontechnologies.com/t/deep-linking-hook/69403/5 "2022-02-08T09:00:33Z")

</div>

> [@LucB](#):
>
> If DEVONtechnologies were to provide such a URL scheme, then they might want to go the extra mile and provide a getDeepURL method, otherwise Hook (and other automation) could construct the URL from AppleScript.

Welcome, @LucB! In case of DEVONthink the `x-devonthink-item://<uuid>` scheme supports already additional parameters like `page` (zero-based page number) or `time` (offset in seconds in audio/video file). Such item links can be copied in the user interface via the contextual menu. Or created via AppleScript like this:

```auto
tell application id "DNtp"
	set theWindow to think window 1
	if exists content record of theWindow then
		set theURL to reference URL of content record of theWindow
		set thePage to current page of theWindow
		set theTime to current time of theWindow
		if thePage is not -1 then
			set theURL to theURL & "?page=" & (thePage as string)
		else if theTime is greater than 0.0 then
			set theURL to theURL & "?time=" & (theTime as string)
		end if
		return theURL
	else if (count of selected records) is 1 then
		return reference URL of selected record 0
	end if
end tell

```

---

_[View the full topic](https://discourse.devontechnologies.com/t/deep-linking-hook/69403)._
