PDFpen を使用してドキュメントを OCR する次の Applescript があります。
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
end tell
最後の繰り返しブロックは、スクリプトの残りの部分が続行される前に、ドキュメントが終了するのを待ちます。rb-appscript でロジックのこの部分を複製することはできないようです。どんな助けでも大歓迎です。