@Steven P
That's true of course. The grread however does eliminate the extra "enter" after the X or Y selection, but it's more of just trying to keep with the original intent of the OP.
That being said - I think the OP would rather have the X or Y switchable on the fly mid-command, I don't think that will work within the command statement. I'll have to spend more time on it, if I get more time. You are welcome to propose your own solution.