WarpToWindow when execing an application

Hi,

I would like to move the mouse cursor inside the window of a particular application, which I exec’d via the FVWM root menu (I am using FocusFollowsMouse, so such a function would be very handy at times)

So far I have come up with the following function, which I found here on the forum:

DestroyFunc WindowAtMiddle
AddToFunc WindowAtMiddle
    I Current WindowStyle PositionPlacement Center
    I PlaceAgain Anim
    I WarpToWindow 50 50

How do I execute this function for an application in the root menu?

Best,
Holger