Hello all;
I am looking for some guidance with macros a la Find/Replace and have no idea where to begin. Here is what I am looking to do:
I’ve just finished my second book, and I am now down to the nitty gritty of editing, things like homophones, quotation formatting, n/m dash formatting, double spaces, and all that goodly annoying stuff. For the last book I used Find/Replace and some RegEx to achieve this. The process was a follows, over and over again:
- Put the cursor at the beginning
- Set up the find
- Increment though each match and check it. It might be right, it might be wrong, especially with homophones
- Reach the end and start over with the next search criteria. I have about fifteen or so of these criteria and each chapter gets the same treatment.
The laborious part of this is resetting the find dialog each time. It just gets old 
So… I was wondering if macro’s would help the issue. All I want to do is have the macro put the cursor at character one of the document, then open up the Find/Replace dialog with a predefined criteria. From there I would take over, press find next, and do whatever needs doing.
In my head there would be a macro for each of my criteria. In short, I want Libre office to keep a library of named searches for me so that I could run down the list with all 45 chapters. This would speed things up considerably.
In my day job I do a lot of scripting, so the concept is not alien to me. However, I have no idea how, or where, to begin. Ideally I would like to manually set up the find, then snapshot it somehow. Barring that I need to find out how to define the criteria programmatically. I guess what I looking for is a sign post of sorts. Where do I begin? There would be a syntax involved here. Where do I find that syntax - not examples of it mind you, but the whole ball of wax, at least for cursor portion and find/replace invocation and setup?
Any guidance would be appreciated.
Thanks in advance.
Regards;
Ken
PS, some side notes:
I know language tool can do part of what I am looking for. However, homophone checking appears to be an online/ AI function. Now, I don’t mind AI. it has its uses, and this is one of them. However, i am allergic to public AI. I simply do not trust the things, or moreover the people behind them. Call me cynical, but I’m going to leave the bear alone for now. 
Also, you’ll likely want to know about the computer and build, so:
System:
- Kernel: 6.8.0-136-generic arch: x86_64 bits: 64 compiler: gcc v: 13.3.0 clocksource: tsc
- Desktop: Cinnamon v: 6.4.8 tk: GTK v: 3.24.41 wm: Muffin v: 6.4.1 vt: 7 dm: LightDM v: 1.30.0
- Distro: Linux Mint 22.1 Xia base: Ubuntu 24.04 noble
Libre Office
- Version: 24.2.7.2 (X86_64) / LibreOffice Community
- Build ID: 420(Build:2)
- CPU threads: 12; OS: Linux 6.8; UI render: default; VCL: gtk3
- Locale: en-US (en_US.UTF-8); UI: en-US
- Ubuntu package version: 4:24.2.7-0ubuntu0.24.04.6
- Calc: threaded

), a dash of Stack Exchange, and some good old fashioned guess work I got about 50% of the way there.
However, I am (at this point) inclined to lend it some credence. The idea makes sense and matches my experience thus far. So, my next question is: IS this true? If it is, what I am up to isn’t possible the way I envision it. That doesn’t mean I am dead in the water, but I will need a new approach.