Macrominnon Posted June 26, 2013 Report Share Posted June 26, 2013 Has anyone experienced any impact to the mouse position based on the windows theme? We have 2 themes - pixel coordinates work in the first theme and not in the second theme. Any suggestions would help. Thanks Quote Link to comment Share on other sites More sharing options...
Cory Posted June 26, 2013 Report Share Posted June 26, 2013 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. Quote Link to comment Share on other sites More sharing options...
Macrominnon Posted June 27, 2013 Author Report Share Posted June 27, 2013 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 Quote Link to comment Share on other sites More sharing options...
Cory Posted June 27, 2013 Report Share Posted June 27, 2013 No. Quote Link to comment Share on other sites More sharing options...
Macrominnon Posted June 27, 2013 Author Report Share Posted June 27, 2013 No. Thanks Cory. Could you direct me to Macro Express learning/training resources on the WEB? Jim Quote Link to comment Share on other sites More sharing options...
Cory Posted June 27, 2013 Report Share Posted June 27, 2013 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. Quote Link to comment Share on other sites More sharing options...
WayneSimacek Posted June 28, 2013 Report Share Posted June 28, 2013 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. Quote Link to comment Share on other sites More sharing options...
Arktouros Posted July 24, 2013 Report Share Posted July 24, 2013 I ran into this before when working on a series of mouse moves relative to window in Windows XP. The Windows XP default theme was 5 pixels off from the Windows Classic theme and caused me to redesign everything as a result. Quote Link to comment Share on other sites More sharing options...
acantor Posted July 25, 2013 Report Share Posted July 25, 2013 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 Quote Link to comment Share on other sites More sharing options...
paul Posted July 25, 2013 Report Share Posted July 25, 2013 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 What a great article! And very well-written too. Quote Link to comment Share on other sites More sharing options...
blakelyg Posted July 25, 2013 Report Share Posted July 25, 2013 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. Quote Link to comment Share on other sites More sharing options...
Cory Posted July 25, 2013 Report Share Posted July 25, 2013 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. Quote Link to comment Share on other sites More sharing options...
paul Posted July 26, 2013 Report Share Posted July 26, 2013 And a fellow Canadian to boot. Ah, that would explain the quality of writing (as opposed to being written by an American! ) 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.