View difference between Paste ID: PdGtzqAj and wEEqpRhH
SHOW: | | - or go back to the newest paste.
1
#Requires AutoHotkey v2.0
2
#SingleInstance force
3
SW := A_ScreenWidth
4
SH := A_ScreenHeight
5
AutoH := SH/1.35 ; 1.35 is the zoom modifiar. If you get black bars on your game's sides, put it lower start at 1.30, save & retest till satisfied
6
;### Do not edit above unless you know what you are doing########################################
7
;################################################################################################
8
9
10
; AutoHotkey script to make Path of Exile borderless windowed
11
12
;###Settings#####################################################################################
13-
; Hotkey to trigger the resizing (you can change F1 to any key you prefer)
13+
14-
Hotkey "F1", StretchedNoBoarderWindow
14+
15
DesiredWidth := SW ; Change to desirerd Width of the gaming window, Accepted Values: Value in Pixels, SW for Same Width as monitor
16
DesiredHeight := AutoH ; Change to desirerd Hight of the gaming window, Accepted Values: Value in Pixels, SH for Same Height as monitor, AutoH for Automatic stretched windowed
17
18
; Set desired window location
19
X := (SW - DesiredWidth)/2 ; Set the desirerd X location of the gaming window, Accepted Values: Value in Pixels 0 being all way left, (SW - DesiredWidth)/2 for automatic center
20
Y := 0 ; Set the desirerd Y location of the gaming window, Accepted Values: Value in Pixels 0 being all way top, (SH - DesiredHeight)/2 for automatic center
21
22
; Game name, change as necessary
23
GameTitle := "Path of Exile"
24
25
; Game path, chance as necessary
26
GamePath := "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Grinding Gear Games\Path of Exile"
27
28
;###Advanced Settings############################################################################
29-
StretchedNoBoarderWindow(ThisHotkey){
29+
30-
    ; Check if the game window is open
30+
;You should not need to edit these.. they are incase your running on a toaster
31
32-
        ; Activate the game window found by WinExist
32+
33-
        WinActivate
33+
; How long the script waits for game to start at maximum before giving up (Seconds)
34
WinWaitTimeout := 20
35
36
; How long until the resolution is changed and borders removed after window is detected (Milliseconds)
37
DelayBeforeTask := 4000
38
39
;#############################################################################################
40
41
; Launchers the game
42
run GamePath
43-
    else{
43+
; Check if the game window is open
44-
        MsgBox "Please launch game first.", "Game not found"
44+
if WinWait(GameTitle, , WinWaitTimeout){
45
    if WinExist(GameTitle){
46-
}
46+
        sleep DelayBeforeTask
47
48
        ; Remove the borders and title bar
49
        ; 0xC40000 = WS_BORDER (0x800000) + WS_DLGFRAME (0x400000) + WS_SIZEBOX aka WS_THICKFRAME (0x040000)
50
        WinSetStyle("-0xC40000", GameTitle)
51
52
        ; Resize the window to borderless dimensions
53
        WinMove X, Y, DesiredWidth, DesiredHeight, GameTitle
54
        ExitApp
55
    }
56
else{
57
    MsgBox "Make sure path to game in script is accurate.", "WinWait Timed Out"
58
    }
59
}
60
return
61