I don't know about xdotool, but I'm eager to know more about it.
Here is the
xdotool manualThe main reason I used xdotool was to freeze the position of the menu during multiple mouse clicks.
The multiple menu works okay without the code, but it shifts slightly (walks across the screen) with each mouse click.
The slight changes in position are annoying and 'untidy' and xdotool fixes that.
Depending on your menu font size, it might be necessary to tweak the amount of correction xdotool applies, by adjusting the pixel values.
Xdotool has many other uses. Example: to type frequently used character strings.