Jump to content
Macro Express Forums

Activate a certain window when more than one window has the same title (duplicate window titles)


Recommended Posts

I have 2 windows that are both titled 'Cisco Webex Meetings', and I am trying to make a macro where one of them them is activated and brought to focus. I can't figure out how to do this, since both windows have the same title, so the macro won't consistently open the one I need.

 

Any help would be appreciated. One potential solution I was thinking, is to have the macro analyze the window and if a certain button exists that contains certain text, then stay on that window. However, the Get Control option does not appear to be able to isolate any of the buttons on the screen.

Link to comment
Share on other sites

I don't have much time so I apologize for the brevity. Many years ago we talked about this problem and the short answer is that there isn't a simple solution. Search the messages and you should be able to find our posts. I think I started it and it was regarding Outlook. If memory serves. 

I don't remember the solution, I know there were a few. I think I ended up either tracking the handle of each window as it appeared with another macro or my macro looped though each window and used controls to identify the one I wanted. 

Sorry I can't be of more help today as I have many tasks to accomplish by end of day. I'll try to check tomorrow.

Link to comment
Share on other sites

Thanks Cory - that lines up with what I was able to find in searching, and unfortunately I can't isolate any controls in the webex app screen.

 

I'm considering exploring autohotkey to see if there might be any solutions for edge cases like this. Definitely would be a large learning curve though.

Link to comment
Share on other sites

5 hours ago, Cory said:

my macro looped though each window and used controls to identify the one I wanted. 

As a variation on this idea -- if controls are not readily accessible to ME -- loop through the windows ("Repeat With Windows" command), activate the ones with matching names, and check pixel color(s) at known location(s) to see if you have the right window.  For example, if there is a colored ENTER button or some such that is unique to the screen you want, use that.  I even have a couple windows where a button changes color when the mouse is hovered over it, so I am able to use the color change to determine whether the screen has finished loading. 

  • Like 1
Link to comment
Share on other sites

Here is a hack that might allow you to get this done with Macro Express:

 

You have two WebEx windows, "1" and "2."

 

Use a macro to resize the windows. For example, make "1" 1000 x 1000 pixels, and make "2" 999 x 999 pixels.

 

Enumerate the windows, and test the dimensions of each. If window width < 1000, do this. If window width >=1000, do something else.

  • Like 1
Link to comment
Share on other sites

On 3/23/2022 at 4:42 PM, rberq said:

As a variation on this idea -- if controls are not readily accessible to ME -- loop through the windows ("Repeat With Windows" command), activate the ones with matching names, and check pixel color(s) at known location(s) to see if you have the right window.  For example, if there is a colored ENTER button or some such that is unique to the screen you want, use that.  I even have a couple windows where a button changes color when the mouse is hovered over it, so I am able to use the color change to determine whether the screen has finished loading. 


This could definitely work, thanks for the idea.

Link to comment
Share on other sites

On 3/23/2022 at 7:57 PM, acantor said:

Here is a hack that might allow you to get this done with Macro Express:

 

You have two WebEx windows, "1" and "2."

 

Use a macro to resize the windows. For example, make "1" 1000 x 1000 pixels, and make "2" 999 x 999 pixels.

 

Enumerate the windows, and test the dimensions of each. If window width < 1000, do this. If window width >=1000, do something else.

This wouldn’t work because it wouldn’t help me figure out which window is which. However, one is the windows is only half size, more like a menu than a window, so I could figure out which one is correct just by the dimensions. Thanks for this idea, I hadn’t thought about using window size.

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