On Aug 04, 2016, at 09:53, Terje Bless <[email protected]> wrote:
> As I come across new mis-scanned words that seem likely to recur I add a new 
> Replace All action to the Text Factory. This is, however, getting tedious to 
> do by hand; and so I would like to make an AppleScript that automates as much 
> as possible of it.
> …
> Does BBEdit support script manipulation of a Text Factory?


Hey Terje,

You can't manipulate a Text Factory with AppleScript.

What you want to do can be done, but it will need to be done with a script and 
not a Text Factory.

What I would do personally (for speed and flexibility) is use the Satimage.osax 
AppleScript Extension 
<http://www.satimage.fr/software/en/downloads/downloads_companion_osaxen.html> 
and save the find/replace patterns to a file.

That makes saving new patterns and maintaining them simple.  It will also be 
much faster than doing numerous serial find/replace operations with BBEdit's 
native methods and allow for a single undo operation.

I'd probably use two scripts:

A) Open Massage OCR pattern file in BBEdit appending selected text (if any) 
script
B) Massage OCR text script

That would let me test my pattern before running it with the main script (B).

If you want to pursue something like that I'll help you.

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to