Sign in to follow this  
Followers 0
ZiggyStardust

Oddities with MouseClick and Desktop Themes

6 posts in this topic

I am just wrapping up a project and noticed a little oddity with the MouseClick function. In this program I MouseClick on an icon. It works well but when I put it on a second computer it did not work. It missed the icon. Every so slightly but missed it on the high side.

In going through a little debug I noticed that the computer I did the developmet on was using the "Windows Classic" desktop theme and the one that just missed the icon was using the "Windows XP" theme.

I went back to the computer I used for development and started switching desktop themes. It did made a difference. The MouseClick under Windows Classic was dead center. The MouseClick under Windows XP was noticibly higher on the icon almost to the point of missing the icon.

I am a newbie at this and am probably missing something but can't put my finger on it. Am I not using the MouseClick function properly?

Thanks!

Share this post


Link to post
Share on other sites



Hi, ZiggyStardust. You can certainly find small oddities between different machines when using something as unstable as MouseClick. If possible, I would suggest using the AutoIt Window Info tool to gather as much information as possible about the application window, and then use ControlClick instead of MouseClick. Otherwise, if you are stuck at MousClick, you may think about moving the window to a specific spot on the screen first, so you can then better control the coordinates that you click at.

Is this a commercially available application you're trying to automate? If you can let us know the name of the application, we can probably provide you with more suggestions.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Thanks! That was the feedback I was looking for. I think I started out using ControlClick but had some problems. The AutoIt Windows Information tool give you a lot of information and I maight have been mis-reading it the first time. Let me give it another try.

I really like AutoIt. I struggle a little with the documentation. Case in point I came across the MouseControlMode option somewhere and just spent an hour trying to find documentation on it with no luck. I would assume it is important but can't find out anything about it!

Share this post


Link to post
Share on other sites

Maybe I am looking in the wrong area for Documentation?

Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:

0 = relative coords to the active window

1 = absolute screen coordinates (default)

2 = relative coords to the client area of the active window

I am going to go back and profess to being a newbie. This is all I see in the help file. Not a lot of detailed explanition for beginners. I do see a corolation between these modes and the "options" in AutoIt Window Info. I get a little lost in the terminology.

Mode 0 is the coord position in the active window?

Mode 1 that is actually a good explanaition but wouldn't that be variable based on screen resolution?

Mode 2 I have no idea what the "client area" of the active win is.

Are these terms explained somewhere else? I guess that is venturing a little from topic. It was recommended above to try and use ControlClick. The modes above and in AutoIt Window Info are only with respect to Mouse functions and ControlClick is not a mouse function correct?

Share this post


Link to post
Share on other sites

No, I don't think ControlClick is a mouse function.

The Client area (to me at least) is the area of a gui you can physically affect without code) like below the title bar perhaps.

But It should not matter, if you use Client or window mode, as the size of the desktop or position of the window with not affect

the click coordinates in these modes.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0