views:

429

answers:

2

Hi, I want to control the mouse pointer with my application and be able to interact with other programs using my program, For example I want my application to be able to click on a button on another application

How should I go about solving this problem? (Any programming language would work, also if you have any suggestion please let me know)

Afterthoughts: I want to do it in windows operating system and want to test my GUI to see if it works in different scenarios. Any language would work for me since this is not part of the final product but I prefer one of these languages (Python, Java, C# or MATLAB)

Thanks

+1  A: 

There are many ways of doing this, and you didn't mention any details of your application (system, target goal, etc...).

If your goal is menial automation, I'd recommend whipping together a quick AutoIt script on Windows. http://www.autoitscript.com/autoit3/index.shtml

If this isn't what you're looking for, please give more details.

pcorey
Thank you I added some more information. I am doing it in windows
Mark
+1  A: 

Okay, this one is really operating system and windowing specific. But the phrase you're looking for is "mouse grabbing".

As @Mitch suggests, unless you've got a really good reason — like maybe a GUI testing app? — then grabbing the mouse and messing with it in that way is very bad form.

Charlie Martin
Thanks I just added more information to the question, I am doing GUI testing and this code is not part of the deliverables
Mark
And just for interact with other applications, there are much better methods, like subclassing (in Windows at least).
Calvin