Get mouse position in NoActivate GUI ?

Get help with using AutoHotkey and its commands and hotkeys
eL Tux
Posts: 48
Joined: 06 Nov 2015, 07:52

Get mouse position in NoActivate GUI ?

22 Jun 2019, 11:48

Hi,

I need to get mouse position relative to the GUI window but without activating this GUI Window, it is posible ?

I don't want to use mouse position relative to screen, i need to use mouse position relative to the Window GUI but this GUI using NoActivate proprietie.

How i can do this ?

Sorry for my poor english.

thx
swagfag
Posts: 2616
Joined: 11 Jan 2017, 17:59

Re: Get mouse position in NoActivate GUI ?

22 Jun 2019, 12:22

subtract the gui's x, y from the mouse's screen x, y
eL Tux
Posts: 48
Joined: 06 Nov 2015, 07:52

Re: Get mouse position in NoActivate GUI ?

22 Jun 2019, 15:19

humm no this probably not works cuz if i switch screen resolution my script will not works.
vsub
Posts: 161
Joined: 29 Sep 2015, 03:39

Re: Get mouse position in NoActivate GUI ?

22 Jun 2019, 16:22

Are you setting the coordmode to screen
CoordMode,Mouse,Screen
the default one is window if you don't set it

Here is an example
On Screen: x540, y368
In Active Window: x370, y289
Window Position: x170, y79,

On Screen X - Window X = mouse position inside the window
540-170=370

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot], Mino and 125 guests