Avoiding double sharps/flats through octave transposition

I’ve seen various threads about avoiding double sharps and flats. There is a very easy way of doing it, by transposing up an octave and checking the option ‘respell to avoid double and triple sharps and flats’, and then transposing down again. My question is: is there any way to create a key-command for that, using macros (or otherwise)? I know how to create macros, but they don’t work for the transpose menu. Thanks for any help!

I think you don’t have to two transpositions. You can transpose to “a Unison”, with the relevant settings.

If Dorico’s native scripting doesn’t handle it, then there’s probably no other way, short of a third-party app that can record UI events; though I wait to be disproved.