AppleScript, Hazel and Abbyy FineReader
- Get link
- X
- Other Apps
i using hazel run applescript execute abbyy finereader 12 ocr files automatically. applescript newbie.
have 3 problems/questions:
1) expect there way detect if abbyy finereader executed or had error not sure how it.
2) when finereader runs, date added , date created set current date/time along date last opened , date last modified. there way maintain date added , date created happens when run application manually?
3) want do, run fine reader if new pdf added, or if pdf modified other finereader. ideas on how accomplish that?
apple script (which found on noodlesoft hazel forum) run using hazel.
code:on hazelprocessfile(thefile) using terms application "finereader" set langlist {english} set savetype single file set exportmodepdflayout "text under page image" set keeppagenumberheadersandfootersboolean yes set keepimageboolean yes set imageoptionsimagequalityenum high quality set usemrcboolean no set makepdfaboolean yes set pagesizepagesizeenum automatic set increasepapersizetofitcontentboolean yes end using terms waitwhilebusy() tell application "finereader" export pdf thefile file thefile end tell waitwhilebusy() end hazelprocessfile on waitwhilebusy() repeat while ismainapplicationbusy() delay 10 end repeat end waitwhilebusy on ismainapplicationbusy() tell application "finereader" set resultboolean busy end tell return resultboolean end ismainapplicationbusy
hi,
i'm not familiar hazel or finereader advice going rather general. can't question 2, far question 1 goes... basic testing error this:
in example, second line fail since can't add text number. error message generated , saved in "theerror" variable. in code choose display error user, can see fit. more detailed , advanced methods, take @ this:code:try set theanswer 10 + "foo" on error theerror display alert "ooops!" message theerror end try
https://developer.apple.com/library...riptlangguide/reference/aslr_error_xmpls.html
it's possible finereader may return *something* useful result of export command (e.g. true or false depending on whether succeeded or not). you'd need @ scripting dictionary find out.
far question 3 goes, assume mean want run script when file added folder? if take @ folder actions. easiest way make them through automator.
hope that's of help!
Forums Macs Mac Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
- Get link
- X
- Other Apps
ABBYY FineReader Crack Free Download is an outstanding OCR and PDF software that rapidly acknowledges and converts images available on Fasisoftz.com PDF text and tables into Word documents, enhancing document processing effectiveness.
ReplyDelete