-- Downloaded From: http://c-command.com/scripts/eaglefiler/ocr-with-pdfpen -- Last Modified: 2011-09-23 on run tell application "EagleFiler" set _records to selected records of browser window 1 repeat with _record in _records set _file to _record's file my ocr(_file) tell _record to update checksum end repeat end tell end run on open _files my ocrAndImport(_files) end open on adding folder items to _folder after receiving _files my ocrAndImport(_files) end adding folder items to on ocrAndImport(_files) repeat with _file in _files my ocr(_file) end repeat tell application "EagleFiler" import files _files end tell end ocrAndImport on ocr(_file) tell application "PDFpen" open _file as alias tell document 1 ocr repeat while performing ocr delay 1 end repeat delay 1 close with saving end tell end tell end ocr