Simulate Mouse and Keyboard clicks

I’ve been testing an app called MacroRecorder to attempt to re-record videos of apps running the same routine but in different languages. The app is a bit clunky and doesn’t quite meet my needs so I wondered is there a way in Xojo to simulate mouse movements, clicks, keyboard clicks etc?

With MBS Xojo Plugins you can use RemoteControlMBS module.

Thank you Christian - I hoped you might have something but couldn’t think what to look for.

Christian - I note that the manual states that MouseMove(x,y) doesn’t create mouse events (which of course I read after trying to work out what was wrong for quite some time!). Is there a way around this limitation?

More specifically - MouseEvents seem to work OK for some rectControls eg Canvas - but I’m having problems getting popup menus using nsMenuMBS to correctly see the mouse movements.

just use MouseClick with value of false. That may do it.

I’ve tried all combinations of mouseup, mousedown, down & up, up & down etc. I think the problem is to do with having a hierarchical menu structure - I can get it to click the first submenu, but subsequent menuitems don’t fire.

I’m close. I can’t get the menuItems to fire, but found I can use nsMenuMBS.performActionForItem to simulate the action instead. It doesn’t light up the menu items as the mouse moves over them, but at least the result is correct.