Task automation

I want to add an empty page at the end of several flows in order to get PDFs with an even page number.
As this is something I have to do quite often I would like to automate this task.

The whole task includes the following steps:

  1. Add an empty page to a layout
  2. Choose “At end of layout” (at this point Dorico creates a page over ride)
  3. Assign a specific master page to the created empty page
  4. And finally remove the page over ride that has been created after point 2

I tried with “Start recording macro” but it records only the first task.
I do not want to buy any hardware like an Elgato Stream Deck.

I have Metagrid for iPad or I could use Autohotkey but before I learn one of those I would like to know if that’s even possible with these apps and which is the easiest to use?

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:

  1. 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.

Thank you for your answer.

Yes, this is what I want to do.

Yes, the layouts have different numbers of page.

This is also what I feared!
I guess, in my “wish scenario” I completely underestimated the factor of selecting a specific page!

In the meantime I realized that I could change the task to this:

  1. Choose insert page
  2. Select “At end of layout”
  3. Use master page and select a specific master page
  4. Click OK
    (In my first scenario I wanted to get rid of the Page over ride sign, but I could let it so)

In this case no specific page must be rightclicked and the “get rid of the page over ride” problem is gone.
Would this be possible?

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.

Ok, though your answer is half encouraging, I may try :wink:
I assume that if Auto Hotkey can do this then probably Metagrid can do this too?

I’ve never tried, but I guess so - there isn’t anything required here that can’t be achieved from the keyboard. Note that the keyboard shortcut for “Insert Pages…” only works within Engrave mode.

OK, thank you

This seems to me far, far easier to do outside of Dorico, manipulating the pdf files directly…

I think that too, but I’m assuming there’s something ON the blank page, like the layout name or something.

If you just want extra blank pages at the end of the document, (is this for booklet or duplex printing?) that should be super easy to automate to the PDF itself.

@ LSalgueiro
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.

@benwiggy
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.

Thanks for all your thoughts

Okay, that is quite different. Sorry for not contributing, but I did not understand you correctly. For what it’s worth, Leo had already given you the best advice (as usual).

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.)