Open lazulkia opened 1 week ago
Could you send the full v1 script? NumPut and co is very confusing for me so having the full script to test would be appreciated :)
The full script is from the forum:
GetWindowPlacement(hWnd) {
NumPut(VarSetCapacity(WINDOWPLACEMENT, 44, 0), WINDOWPLACEMENT, 0, "UInt")
DllCall("GetWindowPlacement", "Ptr", hWnd, "Ptr", &WINDOWPLACEMENT)
Result := {}
Result.x := NumGet(WINDOWPLACEMENT, 28, "Int")
Result.y := NumGet(WINDOWPLACEMENT, 32, "Int")
Result.w := NumGet(WINDOWPLACEMENT, 36, "Int") - Result.x
Result.h := NumGet(WINDOWPLACEMENT, 40, "Int") - Result.y
Result.showCmd := NumGet(WINDOWPLACEMENT, 8, "UInt") ; 1 = normal, 2 = minimized, 3 = maximized
Return Result
}
SetWindowPlacement(hWnd, x, y, w, h, showCmd) {
NumPut(VarSetCapacity(WINDOWPLACEMENT, 44, 0), WINDOWPLACEMENT, 0, "UInt")
NumPut(x, WINDOWPLACEMENT, 28, "Int")
NumPut(y, WINDOWPLACEMENT, 32, "Int")
NumPut(w + x, WINDOWPLACEMENT, 36, "Int")
NumPut(h + y, WINDOWPLACEMENT, 40, "Int")
NumPut(showCmd, WINDOWPLACEMENT, 8, "UInt")
Return DllCall("SetWindowPlacement", "Ptr", hWnd, "ptr", &WINDOWPLACEMENT)
}
V1:
V2 (Converted):
V2 (Expected):