Goal: to get a window to resize to 1/4 of whatever monitor the coordinates are set to.
Problem: it can calculate the window size just fine on monitor2, but on every other monitor it calculates smaller than what it should.
Ive got a vertical task bar on my primary monitor (Monitor2) that is 100 pixels wide. My resolution is 1680x1050 on each monitor for a total of 6720x1050.
Monitor1 ---- Monitor3 ---- Monitor2 ---- Monitor4
Example:Code:
;;-----Variables-----
SetTitleMatchMode, 2
SysGet, Monitor, MonitorWorkArea
RealWidth := (MonitorRight-MonitorLeft)
RealHeight := (MonitorBottom-MonitorTop)
HalfWidth := (RealWidth/2)
HalfHeight := (RealHeight/2)
NotepadHori := -3360
NotepadVert := 0
;;-----Script-----
Run, %SystemRoot%\system32\notepad.exe
WinWait, Notepad
Sleep 500
WinMove, Notepad,, %NotepadHori%,%NotepadVert%, %HalfWidth%,%HalfHeight%
With this code I get a notepad window that is 790 pixels wide where I want it to be 840 pixels.
Any and all help will be very much appreciated!
