lanux128

The Walking Dead: Season 2 noborder windowed option

Sep 19th, 2014
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; The Walking Dead: Season 2 noborder windowed option
  2. ;
  3. ; Last Updated: Sep 19, 2014 (03:19:16 pm)
  4.  
  5. #Persistent
  6. #SingleInstance, Force
  7. #NoEnv
  8. EnvGet, STEAMDIR, STEAMDIR  ; custom Steam folder  
  9.  
  10. SetBatchLines, -1
  11. SetTitleMatchMode, 2        ; partial match
  12. SendMode, Input
  13. SetWorkingDir, %A_ScriptDir%
  14. DetectHiddenWindows, Off    ; they're hidden for a reason.
  15.  
  16. ; put some vars here - start
  17. game_exe            = TheWalkingDead2.exe
  18. game_name           = The Walking Dead: Season 2            
  19. game_appid      = 261030
  20. ; put some vars here - end
  21.  
  22. ; Menu stuff
  23. Menu, Tray, Tip, %game_name% (noborder)
  24.  
  25. Process, Exist, %game_exe% ; check if the game is running
  26. If Not ErrorLevel
  27. {
  28.     Run, % "steam://rungameid/" . game_appid
  29.     Process, Wait, %game_exe%
  30.     If ErrorLevel
  31.       pidtwdgame := ErrorLevel
  32.     GoSub, ResizeMe
  33. }
  34. Else ; it's running, EL = PID
  35. {
  36.     pidtwdgame := ErrorLevel
  37.     GoSub, ResizeMe
  38. }
  39. Return
  40.  
  41. ResizeMe:
  42. WinActivate, % "ahk_pid " . pidtwdgame
  43. WinSet, Style, -0xC00000, % "ahk_pid " . pidtwdgame       ; remove the titlebar
  44. WinSet, Style, -0xC00000, % "ahk_pid " . pidtwdgame       ; remove the titlebar
  45. WinSet, Style, -0x800000, % "ahk_pid " . pidtwdgame       ; hide thin-line border
  46. WinSet, Style, -0x400000, % "ahk_pid " . pidtwdgame       ; hide dialog frame
  47. WinSet, Style, -0x40000,  % "ahk_pid " . pidtwdgame       ; hide thickframe/sizebox
  48. ;move the window to 0,0 and resize it to the width and height of the primary monitor
  49. WinMove, , , 0, 0, %A_ScreenWidth%, %A_ScreenHeight%
  50. Return
  51.  
  52. Esc::ExitApp  ; quick exit
Advertisement
Add Comment
Please, Sign In to add comment