What I am doing is correcting a large OCR'd document. Certain OCR errors follow patterns and can be corrected with BBEdit's RegEx engine
I have a database that stores many Regex patterns that I have found useful in the past. I start the KM macro in that database and copy a Search pattern and paste it into the Search area of BBEdit and then back to the database to pick up the Replace pattern and back to BBEdit to fill in the replace area. If I just want to start searching at that point, it is fine because the document that I want to search is (in your terminology) the topmost one. But I commonly want to start at the beginning of that document, because I am monitoring the entire process as I march down through the document. Sometimes the Replace is inappropriate. (I am deciding on each of the many hits whether I actually will do the replacement.) So I am not doing a Replace All. The BBEdit document in question is the top-most BBEdit document but all the relevant menu items are disabled because I "really" am in the Find dialog as far as BBEdit is concerned so those menus are not active. I did find a partial workaround as described above. The Command-` will cycle the the "topmost" BBEdit document into focus and the menu items that I need (Go to line) are active again and the KM macro can now proceed. This works except sometimes I have an additional BBEdit window or two open displaying other information that is useful in context. Now the Command-` cycles through all the BBEdit windows that are open and this gets confusing. You might find it easier to have your KM macro just directly invoke BBEdit's search commands via the appropriate menu items and/or key shortcuts rather than using 'puppet strings' on the Find window As I see it, once I start pasting these things into the Find dialog I have "lost" my access to the Menu Items of the "topmost" BBEdit document. The Command-` shortcut is the only way that I can easily use KM to get those menu items back. On Monday, November 9, 2015 at 1:30:16 PM UTC-8, Patrick Woolsey wrote: > > On 11/7/15 at 6:05 PM, [email protected] <javascript:> (Robert > Livingston) wrote: > > >I am trying to automate a task with the help of Keyboard Maestro. > > > >I start in another program. I fill in the pieces of the Find > >dialogue window. That works fine. I can start searching and > >replacing in the last BBEdit document. So the Find dialogue > >"remembers that". > > > >Now I want to start the search and replace from the start of that > document. > > > >The problem is that I cannot figure out any shortcut to > >activate the last BBEdit document so that I can arrange to go > >to its beginning. The Find dialogue "knows" which BBEdit > >document it is linked with. [...] > > For reference, the Find window does _not_ have a direct > association with any specific document--instead, BBEdit will > always apply whatever command you invoke in the Find window to > the _topmost_ text document. > > Thus, it would help here to have a bit more background about > both what the starting conditions are within BBEdit, and what > specific actions your KM macro is performing. :-) > > > [PS: You might find it easier to have your KM macro just > directly invoke BBEdit's search commands via the appropriate > menu items and/or key shortcuts rather than using 'puppet > strings' on the Find window.] > > > Regards, > > Patrick Woolsey > == > Bare Bones Software, Inc. <http://www.barebones.com/> > > -- 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].
