Guest drummonds_work Posted January 21, 2005 Share Posted January 21, 2005 Hi, everyone, I'm having a problem in automating the execution of a VBA macro in an Excel spreadsheet. I first try to retrieve the control list from the dialog box that is created by the macro using AU3_WinGetClassList (I'm using the AutoItX C-level interface). For this particular dialog box, this function returns seven controls: <quote> F3 Server 60000000 F3 Server 60000000 F3 Server 60000000 F3 Server 60000000 F3 Server 60000000 F3 Server 60000000 F3 Server 60000000 </quote> First, I believe that this is inconsistent with the documentation. I've read that the classes should be numbered in a manner that makes them unique. However, that's obviously not happening. Using the AutoIT spy, the control names are slightly different: <quote> F3 Server 600000002 F3 Server 600000002 F3 Server 600000003 F3 Server 600000004 F3 Server 600000005 F3 Server 600000006 F3 Server 600000007 </quote> The duplicate #2 entry is not a typo; that is what is returned by the spy utility. This is the first issue that we should note with caution for AutoIT. The numbering scheme for controls should prevent duplicates, which it obviously doesn't for this particular dialog box. Also, I think that these names are also inconsistent with the documentation. The docs claim that two integers will be appended to each class to make them uniquely numbered. The above only added one and did not add them in a manner that made them unique. Lastly, attempts to get a handle on the control using the function AU3_ControlGetText() and referencing the class names "F3 Server 60000000", "F3 Server 600000003", "F3 Server 6000000003", "60000000", "600000003", "6000000003" all fail. So, it appears that the classes returned by AU3_WinGetClassList() and the Spy utility are not valid as far as AU3_ControlGetText() is concerned. Can anyone offer some suggestions as to why I'm seeing these problems? Is this a usage error? Or is something more nefarious happening here? Thanks! Scott 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