SteveR Posted March 15, 2016 Report Share Posted March 15, 2016 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? Quote Link to comment Share on other sites More sharing options...
Samrae Posted March 16, 2016 Report Share Posted March 16, 2016 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. 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.