TheReveller Posted April 17, 2009 Share Posted April 17, 2009 Hi, We can get information from control class such as WindowsForms10.SysListView32, WindowsForms10.SysTreeView32, WindowsForms10.SysTabControl32, but I have a window who has buttons in a WindowsForms10.window.8 class control and I want to get the state of one of the buttons. There is one button who is maintained and I want to know if his state is 1 or 0 (activated or not). Can I do this ? How ? Thanks, TheReveller Link to comment Share on other sites More sharing options...
Richard Robertson Posted April 17, 2009 Share Posted April 17, 2009 Button's don't have states of 0 or 1. Link to comment Share on other sites More sharing options...
TheReveller Posted April 17, 2009 Author Share Posted April 17, 2009 (edited) Well I mean actived or not, checked or not, or whatever... All I want is to get access to those deeper controls. For example, open "My Computer", you have at the top these things : Back, Forward, Up, Search, Folders, View, but all thoses buttons are a some kind of grouped in the control ToolbarWindow32, so I can't send a ControlClick on the Up button for example. Do you get what I mean ? Thanks, TheReveller Edit : Well my example is not good because the case I describe in My Computer is a Toolbar and there is UDF for that. My case is a "Window" as a control... Edited April 17, 2009 by TheReveller Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 17, 2009 Share Posted April 17, 2009 Well I mean actived or not, checked or not, or whatever... All I want is to get access to those deeper controls.For example, open "My Computer", you have at the top these things : Back, Forward, Up, Search, Folders, View, but all thoses buttons are a some kind of grouped in the control ToolbarWindow32, so I can't send a ControlClick on the Up button for example.Do you get what I mean ?Thanks,TheRevellerEdit : Well my example is not good because the case I describe in My Computer is a Toolbar and there is UDF for that. My case is a "Window" as a control...Deep in its little Win32 API heart, most controls are actually little child windows of the parent window. They are little windows of a certain class. When those controls are drawn with the standard Windows APIs, AutoIt can use their standard interfaces and all is well. Sometimes the "little window" that is the control is being drawn by something else, like Shockwave Flash, and there is no standard API available to AutoIt. You might be stuck in those cases with very clunky pixel checking to determine the state of an owner drawn 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...
TheReveller Posted April 17, 2009 Author Share Posted April 17, 2009 Hmm... Fast question I have now for example : Can we access to the toolbar buttons under the menu of Excel 2003 for example ? (New, Open, Save, ...) Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 17, 2009 Share Posted April 17, 2009 Hmm... Fast question I have now for example : Can we access to the toolbar buttons under the menu of Excel 2003 for example ? (New, Open, Save, ...) Only by their hotkeys (i.e. "!fo", or "Alt-f, o" for Open). Because MS Office apps have an owner-drawn menu ("[CLASS:MsoCommandBar]" in this case) that is not from standard Windows APIs. This is no big deal with Excel though, because there is a robust COM interface available, as used by the Excel.au3 UDF which can do (almost) anything that you could from the GUI menu, and can do it while minimized/hidden to boot. 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...
TheReveller Posted April 17, 2009 Author Share Posted April 17, 2009 (edited) So we can't access to CommandBar controls, neither to "Window" controls ? I know that with Excel we can do nearly everything by VBA, I was just looking for an example toolbar to know if we could get the actions/states/clicks on specific buttons pressed in the toolbar. Thanks, TheReveller Edited April 17, 2009 by TheReveller Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 20, 2009 Share Posted April 20, 2009 So we can't access to CommandBar controls, neither to "Window" controls ?I know that with Excel we can do nearly everything by VBA, I was just looking for an example toolbar to know if we could get the actions/states/clicks on specific buttons pressed in the toolbar.Thanks,TheRevellerI wouldn't presume to make a blanket statement on it. There are work-arounds for some controls, not for others. Some controls use standard Windows API despite having strange looking control class names (i.e. "ThunderbirdRT6"). It depends on the specific case you are interested in. 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...
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