MarkShot -> RE: You ALMOST had it perfect - 2 displays (6/17/2021 8:00:01 AM)
|
; Mark Kratzer - 06/17/21 (revised 06/17/21) ; ; This is Window Guard program. ; NOTE: It is not a mod. ; NOTE: It is not a patch. ; It is intended to run along side the game and alter the game's mouse ; behavior so that you can comfortably take advantage of two displays. ; If you only have a single display, it will unload itself automatically. ; If you exit the game it will rapidly unload itself. ; ; This program provides multi-monitor mouse support, RIGHT NOW only for WITE2. ; However this code could easily be adapted to support all such games. ; ; When the game is the active window, the mouse behavior on the primary display ; is exactly the same as full screen. ; ; You may wish to run the manual along side on a secondary monitor. To switch to ; the manual click on your PDF Reader in the Windows Task Bar. This will deactivate ; the mouse guard functionality. ; ; This is written in www.autohotkey.com ; ; You can either run a compiled version EXE or install AHK and run the script. ; ; If you launch this before the game, then you have 30 seconds to run the launch the ; game before this unloads. Or you can launch this after the game. ; ; THIS IS PROVIDED AS IS WHICH MEANS I TAKE NO RESPONSABILITY FOR YOUR GAME, YOUR PC, OR ; YOUR HEALTH. ; ; You are welcome to modify the code redistribute. Please credit all who may have worked ; on the code. ; ; Enjoy - Thankyou. ; ; PS1: Thank you, Gary Grigsby and Team for a superb manual and game which inspired me ; to write this. ; ; PS2: This has been tested and does what it says on the tin. I am leaving this to ; Matrix to compile and make it download for the community. Matrix, contact me ; if you have any questions. If have worked with Erik in the past. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #SingleInstance force #Persistent #NoTrayIcon Game01 = War in the East 2 v TimerInterval = 200 SetTitleMatchMode 1 CoordMode, Mouse, Screen Sleep, 30000 SysGet, MonCnt, MonitorCount If MonCnt==1 ExitApp SetTimer, ScriptDone, %TimerInterval% SetTimer, WatchCursor, %TimerInterval% return ScriptDone: IfWinNotExist,%Game01%, ExitApp Return WatchCursor: IfWinActive, %Game01% { SysGet, Screen, Monitor, MouseGetPos, XPos, YPos If (XPos > ScreenRight) { MouseMove, ScreenRight+5, %YPos% } If (XPos < ScreenLeft) { MouseMove, ScreenLeft-5, %YPos% } } return ; This is reserved for future key binds - hard coded name is needed here ; for games. If you know how AHK works, then you can remap the game's ; hot keys here. #IfWinActive, War in the East 2 v,
|
|
|
|