Jump to content
Macro Express Forums

Windows title help


damac3000

Recommended Posts

We have a program that I use at work here and no matter how many versions that we bring up that all have the same windows title on the type of the page. Is there a way for us to allow a macro to either assign some sort of marker to show the difference between the 2 programs or is there a macro option that will allow us to bring up the first instance or the 2nd instance of this and make it the window we want the macro to work on.

 

If there is no current feature for this... This would make a great suggestion for a future update to include one of the above features so that we can pull up the correct program to use. :ph34r:

Link to comment
Share on other sites

I'm not sure on this one. You mention 'multiple versions,' is that the same as 'multiple instances' of the same program? In the ME editor there is a command under "Wndows/Programs" called "Repeat with Windows." I haven't used it, but I think it saves the names of all the open windows to different variables. I'm not sure if it'll work when they all have the same name (?). I'm not sure, but I think the windows have a "z-order" which is the order in which they were opened. I don't know if the command will read this though... I'm not even sure if z-order is really a real thing... It's been a long week and I might have imagined it! -steve

Link to comment
Share on other sites

There is something in Windows called the Z-Order. From Wikipedia:

 

Z-order is an ordering of overlapping two-dimensional objects, such as windows in a graphical user interface (GUI) or shapes in a vector graphics editor. One of the features of a typical GUI is that windows may overlap, so that one window hides part or all of another. When two windows overlap, their Z-order determines which one appears on top of the other.

Macro Express can read all windows using the Repeat with Windows function and the order that the window titles are received by Macro Express is an indication of their Z-order. But, the problem with using the Z-order to resolve the problem described by the original poster is that the Z-order for each program or window will change as windows come and go or as focus changes from one window to the next.

 

Is there anything on the window that can identify the unique window? If so, is the unique identifier in a Window Control that can be read by the Window Control commands? If so you might be able to write something that uses Repeat with Windows and some Window Control commands to identify the windows.

 

One other approach would be to ask the author of the program to fix the problem by creating unique window titles. I know this is not always an option but thought it worth mentioning.

Link to comment
Share on other sites

There is something in Windows called the Z-Order. From Wikipedia:

 

 

Macro Express can read all windows using the Repeat with Windows function and the order that the window titles are received by Macro Express is an indication of their Z-order. But, the problem with using the Z-order to resolve the problem described by the original poster is that the Z-order for each program or window will change as windows come and go or as focus changes from one window to the next.

 

Is there anything on the window that can identify the unique window? If so, is the unique identifier in a Window Control that can be read by the Window Control commands? If so you might be able to write something that uses Repeat with Windows and some Window Control commands to identify the windows.

 

One other approach would be to ask the author of the program to fix the problem by creating unique window titles. I know this is not always an option but thought it worth mentioning.

 

Thank you .. this may solve some of my problems... See I have multiple versions of the same program that all have the same exact name for the windows tile... unfortunetly we cannot change the title at all so we have a problem with being able to work with multiple versions of the program

Link to comment
Share on other sites

I have one more question regarading the topic above for the windows with the same exact name. If I use the option for alphabetcally and not the option for z-order. If both of them are captured with the same name, how will it order to 2 names. Will it be by z-order, what window launched first, what window is first in the task bar ... or a particular order?

Link to comment
Share on other sites

  • 7 months later...
  • 2 weeks later...

What is it you want to do with the window if you could get it?

 

We had a similiar problem a while back, one was a yes/no dialog and the other a yes/no/cancel... we eventually realised that sending 4 tabs and then enter in either case would do the trick... So we were lucky really.

Link to comment
Share on other sites

  • 3 weeks later...

You could use window positioning instead... if you are willing to be constrained by not being able to move the windows around much...

 

In one of my macros I use a loop that goes to the top of the title bar, detects pixel color, stops and double clicks, then runs commands on the window and then clicks on the restore button. You can use mouse move to location very easily that way as long as you don't change your screen resolution. I use this in Clarify where all of the program windows are embedded into the program itself and don't have windows GUI hooks.

 

You could have the windows tiled out on your desktop, then put your mouse in the window you want the macro to run on (particular windows could always be in the same position for further automation) and hit the macro, it scans upwards, finds the title bar and double clicks to maximize it, runs the macro, restores the window and you move on with your life!

 

It might not be 'wait for window title to become active' but it's better than nothing, no? :)

 

-Rand

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