if name of window 1 is "Preferences" then tell application "PDFpenPro" quit end tell end if else - Scan Doc was previously OCR'd or is already a text type PDF. Code: Select all tell application "PDFpenPro" open theFile as alias - does the document need to be OCR'd? get the needs ocr of document 1 if result is true then tell document 1 ocr repeat while performing ocr delay 1 end repeat delay 1 close with saving end tell -In PDFpen, when no documents are open, window 1 is "Preferences" -If other documents are open, do not close the App. The code is courtesy of Greg Scown, one of the PDFpen developers. However there is (as always) another way of doing this and some may find it neater as it both checks for OCR and closes PDFPro once its completed. I've just bought Devonthink so am about to set up this in a very similar manner. However, I always get an error message in the last step: "Add items to CurrentGroup failed The "Add items to Current Group" action did not have the required data No items to input Does the Automator or DEVONthink still require any permissions or releases? Did you have that too? Maybe you have a solution Best regards Markus AbwehrchefVC Posts: 12 Joined: Sun 9:46 am Hi MikeP, an interesting possibility (since I also always have problems with the script, as soon as I want to add new filenames and paths). I also have a bunch of these running on my downloads folder for statements and the likes. The automator workflows all have three steps and it ends up in the right folder. You can then run these directly from Hazel. For stuff that Hazel is set up to recognise, use OSX automator workflows for each DT folder you want to import into. This is set up with a bog standard OSX folder action (right-click folder -> Services -> Folder Actions Setup), and Hazel dumps unknown stuff into that folder after OCR. There are two options to do the DevonThink import: DT provide an import script (Import and Delete.scpt or something like that) which sucks the file in into the default inbox. As DevonThink provide Automator actions, this might be easier for those less enamoured with unix scripting. MikeP wrote:I just stumbled on this while researching a bug, and it is very near to what I do but without shellscripting.
0 Comments
Leave a Reply. |