@@ -238,6 +238,28 @@ CenterHD(*) {
238
238
Toast(" Center HD" , r, l, t, b)
239
239
}
240
240
}
241
+ FirstFourth (* ) {
242
+ if (GetWindowRectEx(& hWnd, & x, & y, & w, & h, & ofl, & ofr, & oft, & ofb, & r, & l, & t, & b))
243
+ {
244
+ ; -- Calculate the width of one fourth of the monitor
245
+ OneFourthWidth := Ceil ((r - l) / 4 )
246
+ ; -- Set the window position to the left one fourth of the monitor
247
+ WinMove (l - ofl, t - oft, OneFourthWidth + ofr + ofl, (b - t) + oft + ofb, hWnd)
248
+ ; -- Show layout toast
249
+ Toast(" First Fourth" , r, l, t, b)
250
+ }
251
+ }
252
+ LastFourth (* ) {
253
+ if (GetWindowRectEx(& hWnd, & x, & y, & w, & h, & ofl, & ofr, & oft, & ofb, & r, & l, & t, & b))
254
+ {
255
+ ; -- Calculate the width of one fourth of the monitor
256
+ OneFourthWidth := Ceil ((r - l) / 4 )
257
+ ; -- Set the window position to the right one fourth of the monitor
258
+ WinMove (r - OneFourthWidth - ofr, t - oft, OneFourthWidth + ofr + ofl, (b - t) + oft + ofb, hWnd)
259
+ ; -- Show layout toast
260
+ Toast(" Last Fourth" , r, l, t, b)
261
+ }
262
+ }
241
263
CenterHalf (* ) {
242
264
if (GetWindowRectEx(& hWnd, & x, & y, & w, & h, & ofl, & ofr, & oft, & ofb, & r, & l, & t, & b))
243
265
{
@@ -544,4 +566,4 @@ WinGetPosEx(hWindow, &winX := 0, &winY := 0, &winW := 0, &winH := 0, &winOffsetL
544
566
NumPut (" Int" , winOffsetRight := GWR_Right - Right , RECTPlus, 24 )
545
567
NumPut (" Int" , winOffsetBottom := GWR_Bottom - Bottom , RECTPlus, 28 )
546
568
Return & RECTPlus
547
- }
569
+ }
0 commit comments