By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,047 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Simulate user actions??

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.