Jump to content
Macro Express Forums

Windows Control Question


SteveR

Recommended Posts

I have a question about using windows controls. I have a situation where either zero, one or two pop up windows might appear sequentially. Unfortunately both of the windows have the same title so I cannot use that to know which one is there. However, the controls available are different. The first has Yes No and Cancel buttons, the second only Ok. My question is, can I use get control to see if the No button is there or not. This would let me distinguish between the two pop ups and respond correctly depending upon which came up. What happens if you do a get control and the control is not present?

Link to comment
Share on other sites

After your macro performs a Get Control command you can follow it with one of these commands.

If Control %C1% Focused
If Not Control %C1% Focused
If Control %C1% Visible
If Not Control %C1% Visible
If Control %C1% Enabled
If Not Control %C1% Enabled

Macro Express Pro contains additional options:

If Control "%cDialog%" Exists
If Control "%cDialog%" Does Not Exist
If Control "%cDialog%" is visible
If Control "%cDialog%" is not visible
If Control "%cDialog%" is focused
If Control "%cDialog%" is not focused
If Control "%cDialog%" is enabled
If Control "%cDialog%" is disabled

Note that not all of these commands work for every control. It depends on how the program you are automating works.

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...