Hey guys,
I have the need to import a PDF file into Devonthink Pro Office with a shell script:
#!/bin/bash
osascript <<END! - "$@"
on run {title, pathToPDF}
tell application id "DNtp"
try
set pdfFile to pathToPDF as POSIX file
create record with {name:title, type:PDF, path:pdfFile} in current group
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
end try
end tell
end run
END!
Everytime I invoke it , I get an error message “missing value” !
./importPDF.sh "Title" OS\ X\ Tutorial:\ Menus\ and\ Popovers\ in\ Menu\ Bar\ Apps.pdf
This is driving me mad.
Any help will be greatly appreciated.
Cheers
Thorsten