Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; The Walking Dead: Season 2 noborder windowed option
- ;
- ; Last Updated: Sep 19, 2014 (03:19:16 pm)
- #Persistent
- #SingleInstance, Force
- #NoEnv
- EnvGet, STEAMDIR, STEAMDIR ; custom Steam folder
- SetBatchLines, -1
- SetTitleMatchMode, 2 ; partial match
- SendMode, Input
- SetWorkingDir, %A_ScriptDir%
- DetectHiddenWindows, Off ; they're hidden for a reason.
- ; put some vars here - start
- game_exe = TheWalkingDead2.exe
- game_name = The Walking Dead: Season 2
- game_appid = 261030
- ; put some vars here - end
- ; Menu stuff
- Menu, Tray, Tip, %game_name% (noborder)
- Process, Exist, %game_exe% ; check if the game is running
- If Not ErrorLevel
- {
- Run, % "steam://rungameid/" . game_appid
- Process, Wait, %game_exe%
- If ErrorLevel
- pidtwdgame := ErrorLevel
- GoSub, ResizeMe
- }
- Else ; it's running, EL = PID
- {
- pidtwdgame := ErrorLevel
- GoSub, ResizeMe
- }
- Return
- ResizeMe:
- WinActivate, % "ahk_pid " . pidtwdgame
- WinSet, Style, -0xC00000, % "ahk_pid " . pidtwdgame ; remove the titlebar
- WinSet, Style, -0xC00000, % "ahk_pid " . pidtwdgame ; remove the titlebar
- WinSet, Style, -0x800000, % "ahk_pid " . pidtwdgame ; hide thin-line border
- WinSet, Style, -0x400000, % "ahk_pid " . pidtwdgame ; hide dialog frame
- WinSet, Style, -0x40000, % "ahk_pid " . pidtwdgame ; hide thickframe/sizebox
- ;move the window to 0,0 and resize it to the width and height of the primary monitor
- WinMove, , , 0, 0, %A_ScreenWidth%, %A_ScreenHeight%
- Return
- Esc::ExitApp ; quick exit
Advertisement
Add Comment
Please, Sign In to add comment