Neither Script nor Automater Workflow for OCR works

I have already posted about Folder Actions not working which looks to be more of a Lion problem; I’m now trying to work with the automater workflow to convert selection to OCR. I saved it as a application for drag and drop functionality; all I get is an error message that “Automator could not convert the input data to the desired type.”. I am dropping .pdf files, not a file of another type. Can anyone lend a hand?

I am not seeing any issue with images or PDFs dropped onto an OCR workflow. Did you follow the suggestion to include the “Set Current Group” action before the “OCR Items” action?

I dropped in the “OCR Items” action and when it suggested the prerequisite action, I allowed it. I then saved this with no further edits as OCR.app on my Desktop. Then I dropped a JPG of a map and a PDF i[/i] and both OCR’d with no problem at all. (I’m on 10.7.4 BTW.)

What is the recommendation on ‘set current group’ action - I am not familiar with this ?

I guess what I am asking is if the default, included automater workflow works? It doesn’t for me. I don’t have any idea how to build my own workflow. If there is one that works, I would welcome it.

You should give it a try. This one is super-easy and barely takes more than 2 minutes to build. Would you like to?

(I just built another one to use in a different but similar scenario in the same amount of time and I’m not a rocket scientist. No seriously, I am not a rocket scientist. :slight_smile: )

Yes !!! Please

  1. Fire up Automator and choose Application.
  2. In the searchField search for “OCR” and it will show you the “OCR Items” action. Drag and drop this into the empty right-hand pane.
  3. You should be prompted that you should include another action called “Set Current Group”. Click Add and it will drop it in place.
  4. Select File > Save and save it where you like with a name that makes sense to you. Done.

One little thing I would add is to click “Options” on the “Set Current Group” action and check the box that says “Show this action when the workflow runs”. What this does is brings up a dialog that allows you to choose an open database and group within. (The option to create a group on-the-fly may not be working as expected. I’ll have to check into this.)

Note also, that you could choose a Service at the beginning, instead of Application, and create a workflow that you could call when right-clicking on items in the Finder.

Hope this helps. Cheers! 8^)

I think there is also a bug in Automator, or it is the OCR Items action: if the Devonthink app window is open in a different space from that of Automator I get this error:
“can’t get group record because no window is open in Devonthink Pro Office” , even if Devonthink is open, and the destination group selected…

workaround: drag Automator window in the same space as Devonthink’s.