-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbless-wnd-resize
81 lines (66 loc) · 2.24 KB
/
bless-wnd-resize
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
;WINDOW MODE SCRIPT--------------------------------------------
; ####;-------------------------------;####
; ###; POE WIDESCREEN v2.2 ;###
; ####;-------------------------------;####
; Special Thanks to gigachads u/Sanytale and u/plankoe =)
; Thanks to Shayd and u/gvieira
;
; To set window to top of screen on toggling wide mode, line 44 change "SH / 12" to "0"
; ### -------- ###
; ## KEYBINDS ##
; ### -------- ###
; F2 to toggle between widescreen/normal window. Cuztomize at line 41
; CTRL + Arrow-up/Down to move window up/down.
; SHIFT + Arrow-up/Down to move window up/down by 1 pixel.
; Happy grinding! <3
#Persistent
global window := "ahk_class POEWindowClass"
global SW := A_ScreenWidth
global SH := A_ScreenHeight
global CustomWidth := 2499 ; Set desired window width
global CustomHeight := SH ; Adjust if you want a custom height
SetWinDelay, 10
OnExit("ExitFunction")
SetTimer, HideTitleBar, 500 ; checks for and hides title bar if it is shown
return
HideTitleBar:
if WinExist ("ahk_class POEWindowClass")
{
WinGet, Style, Style, % window
if not (Style & 0xC40000) ; If title bar is hidden
return ; do nothing
WinSet, Style, -0xC40000, % window ; hides title bar
sleep 2500 ; delay before resizing
SetTitleMatchMode, 2 ; Match partial titles
WinMove, ahk_class POEWindowClass,, 72, 223, 2499, 1230
}
return
*F7:: ; Keybind for toggling widescreen
WinGetPos,,,, H, % window
if (H = SH)
WinMove, % window,,, SH / 12, CustomWidth, (SH / 1.35)
else
SetTitleMatchMode, 2 ; Match partial titles
WinMove, ahk_class POEWindowClass,, 72, 223, 2499, 1230
return
^Up:: ; move window up. The ^ sign means CTRL
WinGetPos,, Y,,, % window
WinMove, % window,,, Y - (SH / 36)
return
+Up:: ; move window up by 1 pixel. The + sign means SHIFT
WinGetPos,, Y,,, % window
WinMove, % window,,, Y - 1
return
^Down:: ; regular move window down
WinGetPos,, Y,,, % window
WinMove, % window,,, Y + (SH / 36)
return
+Down:: ; move window down by 1 pixel
WinGetPos,, Y,,, % window
WinMove, % window,,, Y + 1
return
ExitFunction()
{
WinGetPos,, Y,, H, % window
WinMove, % window,, 0, 0, CustomWidth, SH
}