473,657 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automating windows applications in C#

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.

Oct 26 '07 #1
3 2517
On Oct 26, 3:01 pm, sportyge...@goo glemail.com wrote:
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.PerformClic k();
}
if you need the mouse click event itself you'll need to do some extra
work to get that one.

Oct 26 '07 #2
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

<sp*********@go oglemail.comwro te in message
news:11******** **************@ y42g2000hsy.goo glegroups.com.. .
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.

Oct 26 '07 #3
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.

--
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com
<sp*********@go oglemail.comwro te in message
news:11******** **************@ y42g2000hsy.goo glegroups.com.. .
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.
Oct 27 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
3210
by: Jerry Weinstein | last post by:
Hi, I know about stored procedures and that they can speed up data entry via the SQL 'insert ' statement. However, one drawback to this method is that using the stored procedure still requires one to manually and individually enter each and every record to be inserted to the database before the procedure is executed. I want to circumvent this tedium by finding a way to use maybe a VB application that prompts a user for the data to be...
7
2622
by: xzzy | last post by:
I need to automate a report in a different database (and thank yous to Terry Kreft for pointing me in the right direction). below is the code with the one line that does not work, marked: 'Does not Work' It appears that the type of object returned from the "AllReports" collection is not a report object. =>> I need it to be an object of type report.
1
2147
by: Richard | last post by:
All, I am writing an Outlook 2000 Add-In .DLL program. I have applied the necessary knowledge base fixes to enable event handling in Outlook 2000 and everything is working except for one thing: When I make changes to the items in a folder I get the ItemAdd() event and the ItemChange() event but I do not ever get the ItemRemove() event.
0
1375
by: Shamil Salakhetdinov | last post by:
Hi All, Have anybody seen somewhere techniques like the one described here: Automating Windows Applications http://www.thecodeproject.com/com/automatingwindowsapps.asp but for managed WinForms application? Basically what is needed:
1
1057
by: jonsolo11 | last post by:
I want to write a program that can automate another program, by supplying it with mouse and text events. First, is this possible? Second, how would I go about doing this? Basically, the other program is visible on-screen, and I want to have my program simulate me clicking on it and typing in information. Also, in order to get feeback, I would like to perform a screen capture on this other program. How do I do that?
22
15329
by: Howard Kaikow | last post by:
There's a significant problem in automating Excel from VB .NET. Reminds me of a problem I encountered almost 3 years ago that was caused by the Norton Auntie Virus Office plug-in. Can anybody reproduce the behavior described below? For this example, I am using Excel 2002 and VS .NET 2002 and VB 6. MSFT KB article 304661 gives a trivial example of early and late binding to Excel from VB .NET. Note that there is a variable naming...
2
1968
by: Sasie7679 | last post by:
Hi, 1. We have a requirement to open applications using VB and showing it within a container. Is it possible to automate applications using VB (i.e Acrobat reader, Paint, Word etc)? It can be any application. When a user provides a particular file name, the file contents should be shown within the container using the corresponding application (example: text file in notepad). 2. Is it possible to open a file using a specific application...
3
1185
by: plangla | last post by:
I am trying to start the default e-mail browser automatically from a menu item click. The code works for the web browser but not for e-mail. This is the sample for web browser that works Private Sub MenuItem25_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem25.Click System.Diagnostics.Process.Start("http://www.company.com")
0
2636
by: =?Utf-8?B?TWFyY2VlcG9v?= | last post by:
I'm a newbie using Visual Studio and Vb.Net. The vbscript below opens a Windows Explorer Search Window. The Windows Explorer Search Window has fields in which the user can insert: (i) a search String Filter, and (ii) a search path String. 1. I can't figure out how to convert the vbscript so that it runs as a Visual Basic standalone .exe file. I'd appreciate any help re what code to use, and re which references are needed. 2. I'd like...
0
8303
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.