OCR with PDFPenPro script questions

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

OCR with PDFPenPro script questions Mon Dec 28, 2020 9:11 am • by kvora
I use OCR with Pdfpenpro AppleScript and it works well generally but
sometimes it is doing so fast that when I am prompted to give a title by the time I write title it has do OCR twice so I end up with 2 files .
sometimes for no reason apparent to me it goes in endless loop. What am I doing wrong?

the script I use is well known from Katie Floyd/ David Spark in around 2010:

tell application "PDFpenPro"
open theFile as alias
tell document 1
ocr
repeat while performing ocr
delay 1
end repeat
delay 1
close with saving
end tell
quit
end tell

Can I change delay to 2 or 3?
kvora
 
Posts: 14
Joined: Thu Jun 11, 2009 8:01 am

Re: OCR with PDFPenPro script questions Mon Dec 28, 2020 10:20 am • by Mr_Noodle
I can't speak for the script, but how is your rule set up?
Mr_Noodle
Site Admin
 
Posts: 9709
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: OCR with PDFPenPro script questions Mon Dec 28, 2020 3:54 pm • by kvora
Mr_Noodle, Please see the link below to see the image of how my rule is setup

https://www.dropbox.com/s/rm3jw1fhwhjcy ... 9.png?dl=0
kvora
 
Posts: 14
Joined: Thu Jun 11, 2009 8:01 am

Re: OCR with PDFPenPro script questions Tue Dec 29, 2020 11:28 am • by Mr_Noodle
You should add a condition to the rule to exclude files if there is a green tag otherwise it potentially can match the same rule again.
Mr_Noodle
Site Admin
 
Posts: 9709
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion