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
As shown in the figure, after entering the link in Alfred, is there a way to open it directly with PDF expert? Instead of opening in Devonthink and then choose to open in PDF Expert.
Thank you very much for your answer 🙏