This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a function that will try to search a given set of elements for a | |
# matching class and name property. See above for example usage, where "Recognize..." | |
# is the name, `button` is the class (or `false` if you don't care about matching the class), | |
# and `entire contents` is the set of all UI elements to search. Sometimes elements don't have a | |
# name or class, which is why the try statement is in there. | |
# It returns "false" if the element was not found. | |
# | |
# This is not super fast, so it is probably best used to get a static reference, | |
# and not in a dynamic function. On my machine it takes maybe 4 seconds to search through | |
# 60 elements or so, 20ish seconds to search through 400 elements (not uncommon for a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Applescript to batch OCR PDFs using PDF Expert. | |
# By Alex Wellerstein. Last updated December 16, 2024. No copyright asserted -- released for public domain use. | |
# Absolutely no warranties, guarantees, promises, ANYTHING provided. Use at your own risk. | |
# | |
# Will automatically save and close each PDF after OCR completes. | |
# Assumes PDF Expert is the default program to open PDFs! | |
# Does not have robust error handling. Held together with duct tape. | |
# Just a temporary solution until Readdle actually supports batch operations. | |
# Seems to work on OS 14.6.1, with PDF Expert 3.10.10. | |
# Has not been extensively tested to see what happens if you try to do other work while it is running; could foul up. |