A couple people asked about his so here you go-
Cubase macros do not test for conditions. So I use a couple apps that fill in the blanks.
Quickeys, and to a lesser extent Keyboard Maestro can see windows and has functions like "Wait for Window with name containing" and "If frontmost window is [named | type]" etc. (Keyboard Maestro can't see windows set to Always-on-Top)
Edit: Also, for PC there is AutoHotkey, arguably even more powerful.
For example, the current issue where you have to hit f3 twice to get focus to a mix console that is already open, can be handled by Quickeys, which works on both WIndows and Mac. I never used it on Windows, so I don't know whether this works there, but I would suppose it does.
Keyboard Maestro is cheaper and Mac only, and does almost everything QK does, plus it can send midi data to Cubase.
I use it as a Generic Remote, and have key commands that solo. select, mute and listen channels directly from the computer keyboard without having to manually interact with the Mix Console.
Attached is a Quickeys macro that makes F3 open Mix Console 1, and if it's already open it brings it to the front.
I'm happy to share the other macros I've made, let me know... Also, on Windows you have the amazing AutoHotkey, that does much of this and is free.
Both apps have a demo you can download.