Skip to content

Utility Functions

imawizard edited this page Oct 19, 2023 · 3 revisions

See utils.ahk.

General

Stringify(v) ; Get an object's string representation for debugging purposes.
StringifySL(v) ; Same as above but without newlines.

ObjClone(v)
ObjMerge(v*) ; Combine objects' properties, precedence is left-to-right.

qsort(arr, "asc" | "desc" | (a, b) => ...) ; Wrapper for C's qsort.

;; Logging
trace(fmt, args*)
info(fmt, args*)
debug(fmt, args*)
warn(fmt, args*)

Windows

IsWindowCloaked(hwnd)
CenterWindow(hwnd)
ResizeWindow(hwnd, delta := 0)

ExtendedFrameBounds(hwnd)
WindowFromPoint(x, y)
GetNextWindowOfApp(hwnd, filter := (_) => true)

ToggleWinDecoration(hwnd, style := WS_BORDER | WS_DLGFRAME | WS_THICKFRAME)
ShowWinDecoration(hwnd, style := WS_BORDER | WS_DLGFRAME | WS_THICKFRAME)
RemoveWinDecoration(hwnd, style := WS_BORDER | WS_DLGFRAME | WS_THICKFRAME)

Clone this wiki locally