@badge234 The rules say on page one that all monitors have to be the same DPI and resolutions.
There is a workaround. The start of the discussions starts here with myself and another user. Please read all of our conversations.
viewtopic.php?p=435203#p435203
Tedious Method:
- Basically what you have to do, is run FindText GUI in your normal Main Monitor, capturing what you want.
- Then close down ALL applications including any Autohotkey scripts running. Then go to your Computer settings and make your second monitor your 'MAIN Monitor'.
- Then Open the FindText GUI again and capture what you need from the monitor. The 'Capture' method will work properly now. Paste the results in your script.
- Then reset everything again and start your normal main monitor again and continue as normal.
It's tedious to set up the script but you only need to do it once. So the one script will search for the 100% scale and if that fails it'll search for the 125% scale. Or however you like to run the script.
I can't remember but you may be able to skip that method and just take a window snippet of the image on the other screen, drag the snippet into your main monitor and do a CAPTURE from there. But if you are dealing with trying to find actual
'TEXT' and not normal images, then I would use the tedious method. As antialiasing issues can stuff things up with 'text' searching.
Here is a basic example of a script I use that is in a loop, but you can see how I have different search areas in there.
You can search the entire screen of both monitors but it can be a little slow depending on your speed needs. My Script below is fast cause I designated certain small areas for FindText to search. If you are capturing different ranges like my script on the second monitor, then the tedious method is needed for the Capture Range to work properly.
Code: Select all
#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Screen
#SingleInstance, Force
#Persistent
DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr") ; add this on top of all your multi-monitor scripts. It fixed issues on mousemoves for me on different screens.
x::
loop
{
Text:="|<1>171717-000000$22.zzXzzyDzzkTzw0Twk1zV07w7Xzk7TzU8Xz0QDw0UDU60y0s3k3MQ0U3k01T0M3s3cj0TXw0yDkDzzUzzybzzs"
Text.="|<2>252525-000000$61.1Uzn1za3sCAqTlYzXDwaCTBkrPVjqv7DauPhokPRvbntBrmTDixbntavnDrrSbnw1Rs3vvj7nvtYrnNgbUMBwkPtUq3o"
Text.="|<3>171717-000000$22.UzVw1s1k303040A000M001k007U00S001w00Ts00y007k00T000M000U0020008001UK0T0w1s"
if !FindText(X, Y, -524, -478, -142, -404, 0, 0, Text) ; 4k monitor 2
if !FindText(X, Y, -2038, 573, -1488, 805, 0, 0, Text) ; 4k monitor 2
if !FindText(X, Y, 1673, 15, 1919, 149, 0, 0, Text) ; now search 1080 Main Monitor
break
MouseClick, Left, X, Y, 1, 1
}
return