Automating windows applications in C#

S

sportygeek3

Hi All,

I am looking for a way to automate other applications
programatically. Is there any C# library that will allow me to do
this?

i.e. I want to be able to iterate the menu items on another
application and send a mouse click to each one.

Thanks,
Pete.
 
C

cfps.Christian

Hi All,

I am looking for a way to automate other applications
programatically. Is there any C# library that will allow me to do
this?

i.e. I want to be able to iterate the menu items on another
application and send a mouse click to each one.

Thanks,
Pete.

you can iterate through all the items using
foreach (MenuItem mnu in menuStrip1)
{
mnu.PerformClick();
}
if you need the mouse click event itself you'll need to do some extra
work to get that one.
 
N

Nicholas Paldino [.NET/C# MVP]

Pete,

No, there isn't, as there isn't a uniform way of automating applications
on the Windows platform. Applications can expose automation through a
number of different ways, some of them being, but not limited to DDE,
Windows Messages, COM, Remoting, WCF.

Because of that, you will have to write custom code depending on the app
you are trying to automate.
 
A

Andrew Faust

As Nicholas said, there's really no good uniform way to do what you want.
Some testers at my company use AutoHotkey (http://www.autohotkey.com/) for
some automation testing. It works by simulating mouse & keyboard clicks.
It might have some of the functionality you need.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top