Windows Spy - What is the difference between Screen/Window/Client

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
AfcaEric
Posts: 8
Joined: 29 Sep 2018, 06:29

Windows Spy - What is the difference between Screen/Window/Client

16 Oct 2018, 05:49

Like the title, what exactly is the difference?
For example: if i need the X and Y within Chrome, which one should i look at?
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Windows Spy - What is the difference between Screen/Window/Client

16 Oct 2018, 07:46

Screen: Your entire screen and everything displayed on it.

Window: A specific window, including the titlebar, menubar, statusbar, etc.

Client: A specific window, EXCLUDING the titlebar, menubar, statusbar, etc.

In Chrome, if you use Client, the coordinates should only match the webpage content. If you used Window, you could find toolbar buttons, icons, menus, etc.
AfcaEric
Posts: 8
Joined: 29 Sep 2018, 06:29

Re: Windows Spy - What is the difference between Screen/Window/Client

17 Oct 2018, 08:23

TheDewd wrote:
16 Oct 2018, 07:46
Screen: Your entire screen and everything displayed on it.

Window: A specific window, including the titlebar, menubar, statusbar, etc.

Client: A specific window, EXCLUDING the titlebar, menubar, statusbar, etc.

In Chrome, if you use Client, the coordinates should only match the webpage content. If you used Window, you could find toolbar buttons, icons, menus, etc.
Ok, so let me get this straight. I'm mostly using "Click" functions. Click is based on CoordMode. If i set my CoordMode to Screen, i will need to use the "Screen" coordinates from Windows Spy to use within Click commands, right?
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Windows Spy - What is the difference between Screen/Window/Client

17 Oct 2018, 09:21

Correct.

If you set the CoordMode to Screen, you will use the "Absolute" mouse position.

Code: Select all

CoordMode, Mouse, Screen
This means that the zero x & y position will begin at the top-left of your screen.

If you were using the Window CoordMode, the zero x & y coordinates would begin at the top-left of the active window.

And finally, if using Client, the zero x & y coordinates would begin at the top-left of the area inside the active window excluding the TitleBar, Menu, Borders, Statusbar, etc... This is useful because sometimes depending on operating system version, and visual theme, the window buttons, menus, etc. can vary in size and offset the coordinates you are expecting.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: scriptor2016 and 267 guests