terrypin Posted January 9, 2007 Report Share Posted January 9, 2007 I've just made my first simple attempt at using Controls, but it failed. I just want to click the Done button to close a dialog window. Using Get Control (with the Using Text option) seemed to work correctly. For example, a thin rectangle appeared over the button when I positioned the cross-hairs over it. And Display Details gave me information about the control. Meaningless to me but FWIW: - MOTV.EXE Ï . - Picture/Video Settings - [#32770] - [#32770] - CCtrlTabPanel - [AfxWnd80s] - CCtrlTabPanelPg - [AfxWnd80s] Done - [button] But when it got to the command Mouse Single Left Click on Control %C1% ME gave the error: "The specified control, C1, could not be found. The macro will be aborted." I tried adding a 0.1 s delay after the Get and before the mouse click, but no joy. Anyone have any ideas please? If it helps, the program is a video editing application called MemoriesOnTV, from Codejam. -- Terry, West Sussex, UK Quote Link to comment Share on other sites More sharing options...
kevin Posted January 9, 2007 Report Share Posted January 9, 2007 Macro Express uses two different methods to identify a control. One uses 'Text' and the other does not. Try using the Get Control with and without the 'Get Control Using Text' option in the 'Capture Window Control' dialog. Some controls work with one method and not the other. Another thing to be aware of is that some applications change the controls each time they run. The Get Control command will not work with these programs because the control is different when you are creating the macro and when the macro and application are running later. If this is the case, you may be able to use the Capture Control command. This command allows you to get the values of the control as the macro is running. You will, however, need to know the position of the control in order to use the Capture Control command. Quote Link to comment Share on other sites More sharing options...
terrypin Posted January 9, 2007 Author Report Share Posted January 9, 2007 Thanks Kevin. I had tried with and without the 'Using Text' option, but it made no difference. Meanwhile I've settled for simply moving the mouse to the button and clicking it, which seems to be what that Capture Control method uses. (I couldn't get the other two options of Capture Control to work.) Of course, that limits the macro's flexibility. In general, what proportion of controls do actually work in practice please? Is it a minority? Or is this application of mine a fairly rare exception? -- Terry, West Sussex, UK Quote Link to comment Share on other sites More sharing options...
kevin Posted January 9, 2007 Report Share Posted January 9, 2007 We really have no idea how many applications support Window Controls. Nor do we know how many that do have Window Controls change them each time they run. When we added support for Window Controls we knew it would be a great feature for some applications. But we have no way of knowing which applications support Window Controls. Quote Link to comment Share on other sites More sharing options...
terrypin Posted January 10, 2007 Author Report Share Posted January 10, 2007 "We really have no idea how many applications support Window Controls." Really? That surprises me. I'd have thought that after such a long period of practical experience, you'd have at least a rough idea! Both as a result of your own tests (on programs other than Notepad and Calculator) and from reports and queries by users, including here. Whatever. Within a week or so, I expect I'll have a feel for the proportion myself, after similar tests with say another dozen of my regular programs. Any other users here with any useful feedback they can share please? -- Terry, West Sussex, UK Quote Link to comment Share on other sites More sharing options...
kevin Posted January 10, 2007 Report Share Posted January 10, 2007 Really? That surprises me. I'd have thought that after such a long period of practical experience, you'd have at least a rough idea!Normally we only hear from those who discover their application does not support Window Controls. Why would someone contact us when it works? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.