Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requires AutoHotkey v2.0
- #SingleInstance force
- SW := A_ScreenWidth
- SH := A_ScreenHeight
- 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
- ;### Do not edit above unless you know what you are doing########################################
- ;################################################################################################
- ; AutoHotkey script to make Path of Exile borderless windowed
- ;###Settings#####################################################################################
- ; Set the desired width and height for the borderless window
- DesiredWidth := SW ; Change to desirerd Width of the gaming window, Accepted Values: Value in Pixels, SW for Same Width as monitor
- 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
- ; Set desired window location
- 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
- 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
- ; Game name, change as necessary
- GameTitle := "Path of Exile"
- ; Game path, chance as necessary
- GamePath := "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Grinding Gear Games\Path of Exile"
- ;###Advanced Settings############################################################################
- ;You should not need to edit these.. they are incase your running on a toaster
- ; How long the script waits for game to start at maximum before giving up (Seconds)
- WinWaitTimeout := 20
- ; How long until the resolution is changed and borders removed after window is detected (Milliseconds)
- DelayBeforeTask := 4000
- ;#############################################################################################
- ; Launchers the game
- run GamePath
- ; Check if the game window is open
- if WinWait(GameTitle, , WinWaitTimeout){
- if WinExist(GameTitle){
- sleep DelayBeforeTask
- ; Remove the borders and title bar
- ; 0xC40000 = WS_BORDER (0x800000) + WS_DLGFRAME (0x400000) + WS_SIZEBOX aka WS_THICKFRAME (0x040000)
- WinSetStyle("-0xC40000", GameTitle)
- ; Resize the window to borderless dimensions
- WinMove X, Y, DesiredWidth, DesiredHeight, GameTitle
- ExitApp
- }
- else{
- MsgBox "Make sure path to game in script is accurate.", "WinWait Timed Out"
- }
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement