BeMa Posted December 13, 2005 Share Posted December 13, 2005 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 More sharing options...
seandisanti Posted December 13, 2005 Share Posted December 13, 2005 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 Bernhardwell 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 More sharing options...
MHz Posted December 13, 2005 Share Posted December 13, 2005 Forget the math. Just work within the window area. Opt("MouseCoordMode", 0) Link to comment Share on other sites More sharing options...
LxP Posted December 14, 2005 Share Posted December 14, 2005 (edited) The _ControlGetHandleByPos() UDF has proven to be useful in the past when working with .NET applications.P.S. Welcome to the forums! Edited December 14, 2005 by LxP Link to comment Share on other sites More sharing options...
BeMa Posted December 14, 2005 Author Share Posted December 14, 2005 The _ControlGetHandleByPos() UDF has proven to be useful in the past when working with .NET applications.I'll try this, thanks for the hint.Bernhard Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now