Skip to content

Window click not working #254

Answered by spyoungtech
zSynctic asked this question in Q&A
Discussion options

You must be logged in to vote

The Window.click method uses ControlClick under the hood. So, it obeys the relative positioning considerations mentioned in the docs there. That is:

Mode 1 (Position): Specify the X and Y coordinates relative to the upper left corner of the target window's client area.

If the window you're interacting with is in the foreground, you may find using ahk.click easier if you want to use coordinates relative to the screen rather than the window.

By default, .get_mouse_position() (or .mouse_position) will retrieve coordinates relative to the active window. This is also the default behavior for ahk.click (which uses Click) but you can set the coordinate mode to change this behavior.

From the ex…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zSynctic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants