Jump to content
Macro Express Forums

Finding Control Text


pg13

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Then 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.
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...