Simulate user actions??

  • Thread starter diegocarpintero
  • Start date
D

diegocarpintero

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
 
M

Michael Nemtsev

Hello (e-mail address removed),

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
 

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