Тема: AHK: Как узнать толщину рамки окна?
Доброго дня!
Как узнать длину(толщину, размер) левой, верхней, правой и нижней части сторон активного окна?
Прикрепил скриншот
Искал в интернете, но ничего не нашёл!
В документации на офф сайте ahk нашёл только это:
(Проблема в лишь том, что он рассматривается относительно рабочего стола, а не клиентской части окна)
; Источник: https://www.autohotkey.com/docs/commands/DllCall.htm
; Structure Example: Pass the address of a RECT structure to GetWindowRect(), which sets the structure's
; members to the positions of the left, top, right, and bottom sides of a window (relative to the screen).
Run Notepad
WinWait Untitled - Notepad ; This also sets the "last found window" for use with WinExist() below.
VarSetCapacity(Rect, 16) ; A RECT is a struct consisting of four 32-bit integers (i.e. 4*4=16).
DllCall("GetWindowRect", Ptr, WinExist(), Ptr, &Rect) ; WinExist() returns an HWND.
MsgBox % "Left " . NumGet(Rect, 0, "Int") . " Top " . NumGet(Rect, 4, "Int")
. " Right " . NumGet(Rect, 8, "Int") . " Bottom " . NumGet(Rect, 12, "Int")