Jump to content

Automating .Net application


BeMa
 Share

Recommended Posts

Hi,

forumsearch und reading the FAQ did not give me an idea how to automate .Net applications created with Visual Studio.

The problem is, that in these programs the identifieres for the controls (ControlID and ClassName) are only temporary valid. They get changed either every times the application starts or when I move to another PC.

Does anybody has an idea how to automate such applications?

Using of xy-koordinates and sendkey with tab is not convinient.

Regards

Bernhard

Link to comment
Share on other sites

Hi,

forumsearch und reading the FAQ did not give me an idea how to automate .Net applications created with Visual Studio.

The problem is, that in these programs the identifieres for the controls (ControlID and ClassName) are only temporary valid. They get changed either every times the application starts or when I move to another PC.

Does anybody has an idea how to automate such applications?

Using of xy-koordinates and sendkey with tab is not convinient.

Regards

Bernhard

well if you can't controlsend() and controlclick() that leaves send() and mouseclick(). as inconvenient as it may be, if that's the only way to do it, you may have to do it that way. Now i do understand that window positions and sizes change, and that can always be a problem, but you do have options to remove some of your environment variables. The easiest thing to do would be to explicitly set the window size and position with your script, so then you have exact coordinates for each of the controls you want to access. If you're worried about people complaining that they can't move their window around etc, then i'd suggest using math to dynamically figure where to click each time. example:

$pos = wingetpos("Your App")
MouseClick("Left",$pos[0] + 200,$pos[1] + 20,1,0)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...