Jump to content
Macro Express Forums

Themes impacting mouse position


Recommended Posts

Not per se and I'd be surprised if there is really any problem with MEP. One problem I often have in mixed environments is that things like themes, toolbars, and individual setups will cause elements to move. A prime example is increasing the Windows font size or the font size in a theme. Elements are often sized to fit the font and that can change the alignment. EG it makes the toolbar a little fatter now a button below is missed. I recommend you take a screenshot and analyze it with a graphics program that will display the pixel position like IrfanView. I'm willing to bet you find that MEP is doing what you told it to and Windows is changing the position of things based on selected theme. If you like post a couple of screenshots and tell me which is not working and I'll compare myself.

 

BTW in cases like these I will save the positions of things in the registry and reference them on macro load. This way each machine has it's own set of coordinates. Or I'll overlay and find a point that exists in the overlap of the two. I've even made training macros for the end user to create the list of coordinates. And of course the better thing to do is use the Windows Controls feature in MEP for interaction. This way it doesn't matter where the button is.

Link to comment
Share on other sites

Not per se and I'd be surprised if there is really any problem with MEP. One problem I often have in mixed environments is that things like themes, toolbars, and individual setups will cause elements to move. A prime example is increasing the Windows font size or the font size in a theme. Elements are often sized to fit the font and that can change the alignment. EG it makes the toolbar a little fatter now a button below is missed. I recommend you take a screenshot and analyze it with a graphics program that will display the pixel position like IrfanView. I'm willing to bet you find that MEP is doing what you told it to and Windows is changing the position of things based on selected theme. If you like post a couple of screenshots and tell me which is not working and I'll compare myself.

 

BTW in cases like these I will save the positions of things in the registry and reference them on macro load. This way each machine has it's own set of coordinates. Or I'll overlay and find a point that exists in the overlap of the two. I've even made training macros for the end user to create the list of coordinates. And of course the better thing to do is use the Windows Controls feature in MEP for interaction. This way it doesn't matter where the button is.

Cory:

 

Thanks for your response. I will get the tool and work on getting the answer.

 

Have you heard of the theme impacting the mouse left click?

 

Again, we have inconsistent behavior between themes.

 

Thanks again,

Jim

Link to comment
Share on other sites

http://macros.com/support.htm

 

Also MEP installs a really good sample file.

 

http://bluepointdesign.com/macros/ I have a few things here but not as much as I used to. I have yet to migrate all my stuff from my old site.

 

Also I'm available for hire. I think I provide a good resource where I can create what you need today and teach you what it takes to make it work so you can learn and manage your own macros.

Link to comment
Share on other sites

We are writing macros for a citrix environment where some users have black backgrounds and some have blue backgrounds. The borders, fonts and everything are off by enough to give us headaches. We're working to move everyone to the same background....but it can impact you if you have to rely on cursor positioning.

 

Until we can get everyone on the same theme, we test for the background color and then have an relative adjustment macro for the main controls we need.

Link to comment
Share on other sites

  • 4 weeks later...

With Macro Express, I know of only two scripting techniques for RELIABLY interacting with a user interface:

 

1. Manipuate the underlying structure programmatically: Capture and interact with controls.

 

2. Send a sequence of keystrokes: e.g., <Alt>f = File menu.

 

Any script that clicks on an (x, y) coordinate is bound to fail under certain conditions, such as changing the theme, increasing a font size, displaying an extra toolbar, etc. Mouse macros can work fine, but they are fragile in the sense that it does not take much to break them.

 

If you are willing to put in the time and effort, it is possible to develop Macro Express scripts that make inferences about the user interface by, for example, examining pixel colours, monitoring changes in the shape of the mouse cursor, checking window titles, and analyzing the content of the clipboard. These techniques result in scripts that are not quite as reliable as those that manipulate controls directly or send series of keystrokes. But the results can be pretty good.

 

I described these kinds of scripting techniques in an article I wrote several years ago:

 

http://www.cantoraccess.com/publications/macros_2007_csun_smartmacros.shtml

Link to comment
Share on other sites

 

What a great article! And very well-written too.

Look at the rest of Alan's site - lots of information on scripting, terminology and macro theory. Would be a must read (or listen to his podcasts as well) in my books. And a fellow Canadian to boot.

Link to comment
Share on other sites

I agree with Alan but I have a third which I mentioned in my opening post. Make the locations variable and store them on each user's machine. I had a client back east who was porting data into a web based Java Applet. This meant that there were no controls to interact with and tab keystrokes in many cases were not 'heard' by the system. Also given there were about a hundred tab stops that could change sequence based on selections it was hopeless. Though we did not end up using it I created a system that would be modified for every user's desktop. As a part of that I included a training macro which would allow the user to correct the position if needed. Later I realized that the elements were scaling and was going to change it to sense the edges to determine origin and scale and apply the X and Y scale to my base values. I found that developing on a big desktop and apply a reduction factor worked reliably.

 

Also another trick I have learned is to consider the overlap of a control in different environments. Normally I will click on the middle. But I've had cases where fonts, borders, and such have moved things slightly. By evaluating the control in question in each environment I found that the center mark of one would cause me to miss another. But I could also see that there was a region of overlap. EG if I clicked on the lower right corner of the instance where the control was the furthest case left and up I could hit all the other instances in various locations.

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