Confused about WindowSpy, Screen, Window, Client, ClassNN

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
M4verick
Posts: 193
Joined: 03 Nov 2020, 12:00

Confused about WindowSpy, Screen, Window, Client, ClassNN

12 May 2021, 11:21

I need some help understanding X & Y coordinates in the Window Spy utility.

1) Screen - this is self explanatory. I understand what this is for. My monitor resolution is 1920 x 1080. It's referring to the coordinates within my monitor resolution - correct?
2) Window - ??
3) Client - ??

4) ClassNN - I know this is not really related to the above 3 but I'm curious what it's used for.

Is the "Window" referring to a particular application? For example, if I have Firefox application running, is it referring to the overall window size of Firefox? If so, then what is client used for?
User avatar
mikeyww
Posts: 26889
Joined: 09 Sep 2014, 18:38

Re: Confused about WindowSpy, Screen, Window, Client, ClassNN

12 May 2021, 11:35

Yes. CoordMode explains the points of reference for the coordinates. The ClassNN is essentially the control name for a specific control within the window. It can be used with the Control commands such as ControlClick and ControlSend. "Window" and "Client" refer to the active window. Window is the default CoordMode. This is often useful for other commands such as ImageSearch or MouseMove, which have common uses in reference to the active window.
M4verick
Posts: 193
Joined: 03 Nov 2020, 12:00

Re: Confused about WindowSpy, Screen, Window, Client, ClassNN

12 May 2021, 11:56

OK so when I'm logged into my email account, I get a pop-up notification such as this one upon a new email arrival:
PM Email notification.png
PM Email notification.png (63.25 KiB) Viewed 567 times
Which coordinate mode should I use if I want to have AHK click on a specific spot? See the area circled in red.
M4verick
Posts: 193
Joined: 03 Nov 2020, 12:00

Re: Confused about WindowSpy, Screen, Window, Client, ClassNN

12 May 2021, 12:00

By the way, I thought that pop-up was coming from the Windows action center but it's definitely not. According to Window Spy utility it's a firefox.exe process.
Window Spy coordinates.png
Window Spy coordinates.png (164.55 KiB) Viewed 563 times
User avatar
mikeyww
Posts: 26889
Joined: 09 Sep 2014, 18:38

Re: Confused about WindowSpy, Screen, Window, Client, ClassNN

12 May 2021, 12:03

You can try Click with the default CoordMode, to see if it works. It is likely to work, because the active window looks like it is that one. If it is not, then it will be your browser window, which will also work (with different coordinates).

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: doodles333, mikeyww and 297 guests