Nogo Posted October 10, 2007 Share Posted October 10, 2007 Hello,I,ve got a problem with reading propertys from .net control.I had managed to click on a distinct buttonrecent post in AutoIt forumby letting AutoIt search for a button with certain text:ControlClick("Leica Application Suite - LAS", "", "[CLASS:WindowsForms10.BUTTON.app.0.2004eee; TEXT:1.6 x]")But now I want to get the state of the Button, if it is brown or black (the sign of "IsChecked" state for the buttons)Reading the properties "IsChecked" or "IsEnabled"MsgBox(0,'',ControlCommand("Leica Application Suite - LAS", "", "[CLASS:WindowsForms10.BUTTON.app.0.2004eee; TEXT:1.6 x]", "IsEnabled",''))Is there anybody, who can help me getting the properties out of a certain .net contoldoes not work.Using WinGetClassList($hWin) does not Work, because there are many buttons of the same class.I've got the idea to use PixelGetColor ( x , y ), but the position of the button is changing, relative and absolute...I've found somthing intresting:http://www.autoitscript.com/forum/index.ph...=controlid++netbut this is a very advanced piece of code and I'am a beginner of AutoIt, so far I see, it contains functions for adding controls in .net-applications , but not reading properties in .net Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 10, 2007 Moderators Share Posted October 10, 2007 You'd be better off telling us where to get the program so we can test it for ourselves... otherwise you could find this thread being full of nothing but hypothetical guesses that will more than likely be way over your head at this stage in your programming/scripting life to comprehend. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Nogo Posted October 10, 2007 Author Share Posted October 10, 2007 This software is only working with a lightmicroscope, unforunately, it does not start the right GUI without having the microscope. So the software will be of no use for you. Yes, I'm looking forward, even to hypothetical guesses! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 10, 2007 Moderators Share Posted October 10, 2007 This software is only working with a lightmicroscope, unforunately, it does not start the right GUI without having the microscope. So the software will be of no use for you.What makes you think I don't have the tools necessary to run what it is you are wanting to be done?Yes, I'm looking forward, even to hypothetical guesses!Sorry, I'm not much for chasing my tail... These types of request for help really do nothing but annoy me... Especially when admitting your comprehension level is not really up to par. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 10, 2007 Share Posted October 10, 2007 If you can click on a particular button by specifying its CLASS/TEXT, then you can use that same info to get its handle. Use the acquired handle to get what state info you can: ControlGetHandle(). That should remove any problems of identity of the control. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Nogo Posted October 10, 2007 Author Share Posted October 10, 2007 @SmOke_N What makes you think I don't have the tools necessary to run what it is you are wanting to be done? They are very seldom being used. If I was unpolite, this was not intended to. Here is the way to get the Software: LAS for Leica microskops @PsaltyDS PERFECT, that works: ControlGetHandle("Leica Application Suite - LAS", "1.6 x", "[CLASS:WindowsForms10.BUTTON.app.0.2004eee; TEXT:1.6 x]") There was no hint in the Helpfile, that even this "[CLASS:window...]" is possible in this context. AutoIt is a very good developed tool indeed, thanks to you and the developers! 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