Readiris OCR Softwa - Made it Scriptable; Can't Pass A File to Command

Hi,
I read this article (http://www.red-sweater.com/blog/150/minimal-scriptability) and set the NSAppleScriptEnabled to Yes for Readiris v11.0.5 (it’s OCR software). That said, I used Script Debugger to take a look at all the new things now available to me via AppleScript. Now, when I execute the following:


Tell Application "Readiris"
   auto recognize
End Tell

When executed, a file open dialog opens in the application. OK, so, looking at the dictionary, I see that a parameter of “reference” can be passed in as optional, and the description says “a list of files to be processed” or something like that. I have tried a couple of different ways to pass in a file with no success. Sorry, I can’t elaborate on that at the moment, it’s late. But basically, I always get an error of not expected type or something like this.

I realize my details towards the end here are sketchy, so I will try and provide these details soon. Also, I realize that performing the steps listed at the URL above do not guarantee that I can use AppleScript with the app, but I think my success thus far has proven that I can, with of course, some potential problems.

I don’t have your app, but after doing the same thing (the FastScripts bit) to Preview which is normally not scriptable, this works:


tell application "Preview" to open alias "path/to/a/pdf/file.pdf"

Adam,

Thanks for your reply.

It turns out that doing a:

tell application "Readiris" to auto recognize file "Path:To:Folder:With:PDF:file.pdf"

causes the application to open the file. I was trying to first get the file info from a Tell Finder block, but this caused a “Not expected type error.”

Thanks again for your suggestion. By the way, what do you mean by “FastScripts bit”?

Setting the NSAppleScriptEnabled to Yes as suggested by Daniel Jalkut of Red Sweater software - he’s the author of FastScripts, which is how I think of him.