Code: Select all
#SingleInstance force
^r::
CoordMode, Pixel , Window
ImageSearch, resX, resY, 0, 0, 400, 400, *150 C:\Users\abc\Desktop\Notepad144.png
msgbox % "Result Window: x=" . resX . " y=" . resY . "`nErrorLevel=" . ErrorLevel . "`n`n" . "AHK Screeen DPI=" . A_ScreenDPI
return
Problem: the above code snippet to identify the notepad is not working on a connected Microsoft Wireless Display Adapter (V.2.0.8442) in extended monitor configuration.
It IS working fine on that same setup / monitor when I use the Windows 10 Display Settings to make the TV monitor ID the "Make this my main display".
It IS also working fine regardless of the main display property on a different (cabled) external monitor.
All displays used have the same scaling factor (150% for me) and I tried the PNG file screenshot from both monitors - identical file and thus same effect, too.
Any idea how to solve the issue would be welcome.