Mouse coordinates are different with Menu or Window Activate Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
michalb93
Posts: 46
Joined: 29 Sep 2022, 04:35

Mouse coordinates are different with Menu or Window Activate

Post by michalb93 » 30 Sep 2022, 03:25

First of all, I'm using 2 screens: monitor on left and laptop on right. I've made a SCRIPT with clicks, it all clicked whereever I wanted to. How did it work:
1) on my left monitor I had script.
2) on laptop I had maximized window of application
3)script after double click was clicking it all correctly.

But, when I added script to GUI with buttons, or even same script but with WinActivate, mouse coords got screwed and clicked in wrong places. Why it did happen? Do I have to find mouse coordinates once again?

GEV
Posts: 1002
Joined: 25 Feb 2014, 00:50

Re: Mouse coordinates are different with Menu or Window Activate  Topic is solved

Post by GEV » 30 Sep 2022, 04:42

Try adding

Code: Select all

CoordMode, Mouse, Screen
on top (auto-execute section)

Otherwise the coordinates are relative to the current active window.

Post Reply

Return to “Ask for Help (v1)”