Jump to content

Problems opening devonthink URLs with Alfred


Recommended Posts

39 minutes ago, Jason30 said:

is there a way to open it directly with PDF expert?

 

Not that URL, no. You can clearly see it's a Devon Think-specific URL.

 

If you want to open the item in PDF Expert, you will presumably need the path to the corresponding PDF file, not just the Devon Think item ID.

Link to comment
5 hours ago, deanishe said:

 

Not that URL, no. You can clearly see it's a Devon Think-specific URL.

 

If you want to open the item in PDF Expert, you will presumably need the path to the corresponding PDF file, not just the Devon Think item ID.

A friend wrote a script for me (with the default software to open PDFs),my problem is that I don’t know how to tell Alfred what it should process. He said that I need to find a way to deliver Alfred my input. 

-- Open record with default app

set theReferenceURL to "x-devonthink-item://4D3C5C22-DF6C-4264-A279-A0B7386A2822" -- replace this with e.g. Alfred's input

tell application id "DNtp"
	try
		set theRecord to (get record with uuid theReferenceURL)
		if theRecord = missing value then error "No record"
		set thePath to path of theRecord
		if thePath = "" or (POSIX file thePath as string) ends with ":" then error "No file"
		tell application "Finder"
			open file (POSIX file thePath as alias)
		end tell
		
	on error error_message number error_number
		if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
		return
	end try
end tell

 

Link to comment

Hi @Jason30,

This workflow (keyword: devon) should do what you want, but it still goes through DEVONthink and, because of that, it is slow.

 

If you describe your use case in more detail, there might be a better solution. 

 

Also, please note that you can also enter the UUID only (e.g. 4D3C5C22-DF6C-4264-A279-A0B7386A2822 in your example). 

hope this helps!

Link to comment
10 minutes ago, giovanni said:

Hi @Jason30,

This workflow (keyword: devon) should do what you want, but it still goes through DEVONthink and, because of that, it is slow.

 

If you describe your use case in more detail, there might be a better solution. 

 

Also, please note that you can also enter the UUID only (e.g. 4D3C5C22-DF6C-4264-A279-A0B7386A2822 in your example). 

hope this helps!

Nice!!! It works perfectly! Thank you for sharing!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...