Jump to content

Jason30

Member
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Jason30

  1. 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!

  2. 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

     

×
×
  • Create New...