pg13 Posted July 8, 2005 Report Share Posted July 8, 2005 I am trying to create a macro for a program that changes its index everytime its run. The problem I am running into is that I need to click on a tab that has a variable index, and no tab stop. I've tried 'Capture Control' but since the index changes every time, ME won't ever find the control. And I can't tab to the control b/c the program doesn't have any tab indexes. So what I want to do is find the text of the control and have my mouse move to that location and click, but I don't know of any command w/i the program or w/i ME to do that. Can someone help me out? Or if you have any other suggestions, I'm all ears. Thanks. Quote Link to comment Share on other sites More sharing options...
kevin Posted July 8, 2005 Report Share Posted July 8, 2005 The Get Control command captures the control information when you are writing your macro. The Capture Control command captures the control infromation when your macro is running. The Capture Control command requires an X and Y position. I would create a macro that determines approximately where the control will be located and Capture the Control. You can then examine the text from the control and see if it matches the tab you want to work with. If not, move the position and Capture the Control again. Quote Link to comment Share on other sites More sharing options...
pg13 Posted July 8, 2005 Author Report Share Posted July 8, 2005 I would do that except when I capture the control for the tab, it doesn't capture any text. ME only recognizes that there is a tab control window there, but doesn't recognize individual tabs. I know that is a problem with ME b/c I have the same issue with my other macros. Quote Link to comment Share on other sites More sharing options...
kevin Posted July 8, 2005 Report Share Posted July 8, 2005 when I capture the control for the tab, it doesn't capture any text. ME only recognizes that there is a tab control window there, but doesn't recognize individual tabsThen Window Controls will not work in this situation. I know that is a problem with ME...Whether or not a component (in this case, the tab) is a Window Control is controlled by how the application was written. Macro Express does not have any control over this. Macro Express only reads whatever Window Controls are defined in the application. Quote Link to comment Share on other sites More sharing options...
kevin Posted July 8, 2005 Report Share Posted July 8, 2005 You may have some success using the Get Pixel Color command. However, this would be a long macro to write. Can you put the tabs in a predictable spot? One appoach may be to: - Save the size and position of the application's window - Set the application to a predetermined size and location - Move the mouse to a predetermined location and click on the tab - Restore the original size and position of the application's window I recognize that this will only work if the tab appears in the same relative location. If the tab moves around this will not work. Quote Link to comment Share on other sites More sharing options...
randallc Posted July 9, 2005 Report Share Posted July 9, 2005 Hi, I presume the tab does not have a keyboard shortcut on the label? Randall Quote Link to comment Share on other sites More sharing options...
kevin Posted July 9, 2005 Report Share Posted July 9, 2005 Does Ctrl+Tab cycle through the tabs? Does the Window Title change as it does? 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.