There’s an ambiguity in your post: at the top you’ve said you want to add an empty page “at the end of several flows”, but then in the steps you’re talking about adding empty pages at the end of a layout.
If you want several empty pages within one layout (a blank page at the end of certain flows, that is), then you’re going to be limited in terms of how much automation you can build in.
If you really do just want one extra page at the end of some layouts, here are the pitfalls I envisage:
If your layouts have different numbers of pages, step 3 is difficult. You could tell your macro to click this up button ten times before applying to Current Page Only and hitting OK,
but a) it’ll slow down the process and b) the number of times clicked would have to be more than the largest number of pages you possibly envisage having in a layout.
2. Step 4 is basically impossible if your layouts have different numbers of pages. A macro could tell Dorico to Remove All Page Overrides, but I can’t think of an easy way for a macro to know how many pages a layout has, and if it doesn’t know that, it can’t know where the last page is, so it can’t specifically right-click that page in order to remove overrides.
Yes, certainly possible. AutoHotkey’s the tool for the job, but it’s a pain to learn (I’ve certainly never bothered). My preference is to use Pulover’s Macro Creator, which is a front-end for AutoHotkey that does most of the heavy lifting for you. Apparently it’s buggy, but I’ve never really found that.
Yes of course, it is true that it easy to add blank pages in a PDF and BTW this is what I always did several decades long with Finale.
I used to create page numbers, additional blank pages for better page turning, copyrights, contents tables in Acrobat.
But I am glad that I now can do all this within Dorico and I do not need Acrobat any more for my scores.
I even found out that I can very easily add an additional customer specific copyright line within Dorico.
I do this to symbolically protect my work from free distribution.
For this I simply add one line in the First master page and in the Default master page and all parts get this additional copyright.
In fact adding an empty page at the end of a flow is not more work than inserting a blank page within a flow but I thought it would be usefull to automate this task.
And Pianoleo is right, I add a copyright line to any blank page this is why I assign a specific master page to the blank page.
This added blank page is for the case that I put all parts in one PDF.
In this case each part/book must have an even pages number in order to be separately printed from the next part/book.
But in fact I still did not decide if I simply should distribute single PDF for each part.
In this case there is no need to add a blank page at the end.
And as previously stated I love it to do all the necessary work in Dorico only.
Heh, that’s funny, it’s exactly the opposite for me! Following your advice here on the forum, I tried Pulover’s Macro Creator once, but I went back to plain autohotkey rather quickly. That UI was more confusing than helpful for me. (And the online documentation for autohotkey is actually quite good.)