Code: Select all
~LButton:: ToolTip(A_ScreenWidth "," A_ScreenHeight "," A_ScreenDPI)
For monitor 1, the size is 2560×1600 and the zoom is 200%.
For monitor 2, the size is 3840×2160 and the zoom is 175%.
First, I set monitor 1 as the main monitor and start the script. It shows "2560,1600,192" correctly.
Then I set monitor 2 as the main monitor. It shows "4389,2469,192" wrongly.
Then I restart the script. It shows "3840,2160,168" correctly.
Then I set monitor 1 as the main monitor. It shows "2240,1400,168" wrongly.
Then I restart the script. It shows "2560,1600,192" correctly.
I think the cause is that A_ScreenDPI cannot update when changing the main monitor, which led to A_ScreenWidth and A_ScreenHeight mistakes. A_ScreenDPI update only when restarting the script.