OCR with PDFScanner

Hi everyone
I try to create a rule to ocr a pdf and then move it to somewhere else.
I looked at the help from PDFScanner and I found this:
https://www.pdfscannerapp.com/applescript/
I'm a absolute beginner in scripting so I adapted it to this:
When I run it, I got a error:
2018-11-01 22:32:23.266 hazelworker[6664] Scan 2018-11-01 13.24.47.pdf: Rule ScannerOCR matched.
2018-11-01 22:32:23.269 hazelworker[6664] [Error] AppleScript failed: Error executing AppleScript on file /Users/marco/xxxxxxxx/OCR_input/Scan 2018-11-01 13.24.47.pdf.
2018-11-01 22:32:23.269 hazelworker[6664] OSAScript error: {
NSLocalizedDescription = "The variable pdf is not defined.";
NSLocalizedFailureReason = "The variable pdf is not defined.";
OSAScriptErrorAppAddressKey = "<NSAppleEventDescriptor: null()>";
OSAScriptErrorBriefMessageKey = "The variable pdf is not defined.";
OSAScriptErrorMessageKey = "The variable pdf is not defined.";
OSAScriptErrorNumberKey = "-2753";
OSAScriptErrorOffendingObjectKey = "<NSAppleEventDescriptor: 'utxt'(\"pdf\")>";
OSAScriptErrorRangeKey = "NSRange: {0, 0}";
Thanks for any help or tricks or even a solution
Marco
I try to create a rule to ocr a pdf and then move it to somewhere else.
I looked at the help from PDFScanner and I found this:
https://www.pdfscannerapp.com/applescript/
I'm a absolute beginner in scripting so I adapted it to this:
- Code: Select all
tell application "PDFScanner"
ocr pdf to pdf in language ger
end tell
When I run it, I got a error:
2018-11-01 22:32:23.266 hazelworker[6664] Scan 2018-11-01 13.24.47.pdf: Rule ScannerOCR matched.
2018-11-01 22:32:23.269 hazelworker[6664] [Error] AppleScript failed: Error executing AppleScript on file /Users/marco/xxxxxxxx/OCR_input/Scan 2018-11-01 13.24.47.pdf.
2018-11-01 22:32:23.269 hazelworker[6664] OSAScript error: {
NSLocalizedDescription = "The variable pdf is not defined.";
NSLocalizedFailureReason = "The variable pdf is not defined.";
OSAScriptErrorAppAddressKey = "<NSAppleEventDescriptor: null()>";
OSAScriptErrorBriefMessageKey = "The variable pdf is not defined.";
OSAScriptErrorMessageKey = "The variable pdf is not defined.";
OSAScriptErrorNumberKey = "-2753";
OSAScriptErrorOffendingObjectKey = "<NSAppleEventDescriptor: 'utxt'(\"pdf\")>";
OSAScriptErrorRangeKey = "NSRange: {0, 0}";
Thanks for any help or tricks or even a solution

Marco