- It turns out that when you create a MsgBox with a lot of text, it creates a very large window.
- I might either make a mod of the MsgBox function to prevent this and/or edit my printscreens script to ignore pixels beyond a certain width/height.
Code: Select all
q:: ;MsgBox: get dimensions
vOutput := ""
VarSetCapacity(vOutput, 1000000*2)
Loop, 1000
vOutput .= "a`r`n"
SetTimer, MsgBoxGetPos, -1
MsgBox, % vOutput
return
MsgBoxGetPos:
WinGetPos, vWinX, vWinY, vWinW, vWinH, A
SendMessage, 0xE, 0, 0, Static1, A ;WM_GETTEXTLENGTH := 0xE
vLen := ErrorLevel
MsgBox, % Format("x{} y{} w{} h{}", vWinX, vWinY, vWinW, vWinH) "`r`n" "text length: " vLen
return
;note: I use a large font
;e.g. 100 lines: x504 y0 w279 h3012
;e.g. 1000 lines: x504 y0 w279 h28209 ;taller MsgBox than for 10000 lines?
;e.g. 10000 lines: x504 y0 w279 h11142