I would be very grateful for help in executing multiple Find and Replace operations inside OmniOutliner (OO), using Applescript. The following code runs without error in BBEdit’s integration with Applescript:
tell application “BBEdit”
activate
replace “word press” using “WordPress” searching in text 1 of text window 1 options {search mode:literal, starting at top:true, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false}
…
end tell
I repeat “replace … false}” segment multiple times, and each time there is a different pair of items to find and replace. So, once I tell Script Editor to Run, a very large number of corrections are executed from one command.
On trying the following code inside OmniOutliner I get an error message from the Applescript compiler:
tell application “OmniOutliner”
activate
replace “neighborhood” using “neighbourhood” searching in text 1 of text window 1 options {search mode:literal, starting at top:true, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false}
end tell
The error message reads: “syntax … Expected end of line, etc. but found identifier.”
I have searched in vain for sample Applescript code that will do multiple Find and Replace operations, and so I’m here seeking help. I am trying to avoid manually invoking the Find-and-Replace procedure N different times while working in OO.
Thanks in advance for looking at my problem and any help you might offer.
BTW. Here Looking for Examples of OmniOutliner Applescripts is the last time this topic seems to have been discussed in our Forum.