Jump to content

Y coordinate is wrong?

Recommended Posts


using the Autoit Info tool (with coord mode = screen), the y coordinate of a red pixel i need to find is 122.
Using PixelSearch in the code, the pixel is found, but the y coordinate is wrong, it's too low (350), while the x coordinate is correct.
According to the Autoit Info tool the y size of the window is 1100 and WinGetPos (from within the code) tells me the same, but if i use MouseMove(x,1000), the mouse moves all the way down to the end of the screen, so outside the window.
This shouldn't make any difference, but i tried Opt("MouseCoordMode", 1) and Opt("PixelCoordMode", 1).

At first the x and y coordinates of the window were -32000,-32000, but that was solved after rebooting the computer.
The problem with the y coordinates is still there though :(
It's like the screen is stretched in the y direction, but not for the eye, if you know what i mean.

Does someone know what's happening here and how to fix this please?

Looking fwd to a reply.

Kind regards, smack



Link to post
Share on other sites

Hello @smack,

Could you please explain what you are trying to achieve instead of how you're doing it? :) 

It will be easier for us to help you this way ;)

PS: provide a screenshot and/or your code if possible.

Edited by Neutro
Link to post
Share on other sites

Thanks for the reply.

Some program loads images and displays them as thumbnails, tiled horizontally. These thumbnails don't always have the same size.
All images have a grey line around the thumbnail, the active image has a red line around it (and only one can be activated).
I need to retrieve the position of the active image and check if there is a next one, so i can loop some function until there is no image left.
I can use the PixelSearch function for this and this normally works fine for this kind of things , but on that computer the returned y position is wrong.
If i test this at home with the scroll bar in the webbrowser, it works fine, so i assume it might be computer related?
I mean, how can the mouse (with MouseMove(x,1000)) move all the way down, so outside the window, to the end of the screen, if the vertical window size is 1100? That shoulnd't be possible.

Is there another way to accomplish what i want to do?
Perhaps with ControlListView?
I've been testing a bit with "GetItemCount" + "IsSelected" + "Select" (+ "DeSelect") and this seems to do the job (though it's not the program i'm writing it for, that's at my work)
Or is there a better way to do this?

Link to post
Share on other sites

Regarding ControlListView:
Today i found out that the program i need it for, doesn't return any control info (buttons, listview) at all, only the window does.
There is no other way to retrieve control info than with Autoit's Info tool?

Edited by smack
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...