473,756 Members | 8,006 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simulate user actions??

I am writing a c# class which main purpose is to simulate the dialog
with a GUI-application.

The idea is that this class can simulate some user actions like mouse
clicks on buttons.

I have found the following possibilities to simulate it:

1) Use SendInput Function (user32.dll) (unmanaged code)
2) Use System.Windows. Forms.SendKeys (managed code)

Anyway, I would like to use some function (if possible managed code)
that provides me the "control" of a window (maybe like FindWindow),
and once I have the control in some way it would be perfect to make
something that returns me a list of all GUI components (buttons, check
boxes...) of this window. So, I could interact with this objects.

The advantages of this solution is obviously that it is not necessary
to know the coordinates of the buttons (for example) which would it
make independent of the screen-resolution.

Any suggestions?

Regards,
Diego Carpintero

Sep 4 '06 #1
1 2222
Hello di************* @hotmail.com,

what's wrong with FindWindow and GetWindow functions?
SPY++ helps u in this
I am writing a c# class which main purpose is to simulate the dialog
with a GUI-application.

The idea is that this class can simulate some user actions like mouse
clicks on buttons.

I have found the following possibilities to simulate it:

1) Use SendInput Function (user32.dll) (unmanaged code) 2) Use
System.Windows. Forms.SendKeys (managed code)

Anyway, I would like to use some function (if possible managed code)
that provides me the "control" of a window (maybe like FindWindow),
and once I have the control in some way it would be perfect to make
something that returns me a list of all GUI components (buttons, check
boxes...) of this window. So, I could interact with this objects.

The advantages of this solution is obviously that it is not necessary
to know the coordinates of the buttons (for example) which would it
make independent of the screen-resolution.

Any suggestions?

Regards,
Diego Carpintero
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Sep 5 '06 #2

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

Similar topics

3
5345
by: ^CeFoS^ | last post by:
Hi to everybody, due to I want to use the serial port of a server machine through an applet allocated in html document. > Then one application will run in the server machine and using > the serial port. The other application that will be called in the html > document that it'll allocate the frame with the user interfaz and > it'll manage the events (applet). > > But I have any questions. I suppose the server application will be > running...
2
1802
by: Amir Eshterayeh | last post by:
simulate virtual directory for each user Dear Friends Would you please give me your professional idea about this asp.net problem. I need different virtual directory for different customer with their names like these: www.oursite.com/Jack www.oursite.com/Sue
6
2906
by: Robert Pettersson | last post by:
Hi, I have built an webapp in C# that uses SMTPMail to send mail to users. When I installed it on the prodserver everything worked fine for me, but the users can not send mail. They get Access denied. If I add them to the administrator group of the server everything works fine. I have set <identity impersonate="true"/>
1
9358
by: Steve M. | last post by:
Hello all. I have a dropdown list: <select name="select" class="mapMenu" onChange="JumpToIt(this)"> <option selected value="none">Select a Tool --</option> <option value="javascript:onCreatePrintable()">Print Map</option> <option value="javascript:onFindLatLong()">Find Lat/Long</option> </select>
3
29905
by: John Dalberg | last post by:
I have an app that keeps popping up a windows with a 'Yes' or 'OK' button on it. I am trying to write a little app that automates hitting the enter key so I don't have to do it myself. I used the FindWindow method to get a handle of the window and then issued: SendMessage(hwnd, 273, 0, IntPtr.Zero) to send an ENTER key to it but it didn't work. If I need to get the handle of the 'OK' button, how do I do it? (How do you
1
1210
by: ummaria | last post by:
Hello everyone, I'm developing a web application using ASP.NET and VB.NET connected to a MS SQL Server. I want the system to automatically save user actions. For example, when a user logs in, I want the system to automatically save the date + time of log in and also if the user have added or edited anything to the database. I also want to know how is the easiest way to design that page and sort these actions? By users? by date? or...
5
30686
by: nuhfeken | last post by:
We have a C# winform that uses the MVP design pattern for the user interface. For reasons I'd rather not explain we need to simulate a right mouse click on a specific control to deactivate the control. I found code that almost does what we need. private static extern void mouse_event( UInt32 dwFlags, // motion and click options UInt32 dx, // horizontal position or change UInt32 dy, //...
25
3922
by: chrissirhc | last post by:
Hi, Is there anyway to simulate a Users’ mouse actions using coldfusion? The goal is the automatically complete a series of online forms that have text boxes, drop down menus, links and Submit buttons. Thanks
12
6952
by: Daniel Klein | last post by:
I'm pretty new at php and web stuff so please be gentle with me. I'm trying to get a form to submit when the user presses the Enter key. I do not want to use javascript. I've googled this to death and cant find the answer (only hints), except on the 'Experts Exhange' page and you have to pay to get the answer :-( Why is this such a secret in the open source world we live in? Daniel Klein
0
9297
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
10069
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9904
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...
0
8736
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7285
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
5168
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
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2697
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.