Keep DCS (Digital Combat Simulator) Window Active

主页 > 用户文件 > Keep DCS (Digital Combat Simulator) Window Active
任何版本
其他
Keep DCS (Digital Combat Simulator) Window Active
用户投票: 0
投票
您对此文件进行了投票

Keep DCS (Digital Combat Simulator) Window Active

类型 - 工具
上传者 - csbeau1969
日期 - 2023-12-21 22:56:13
This simple script file keeps DCS as the active window.

Updated so that it is forward-backward compatible with versions of AutoHotKey.



This file is the solution to a problem I noted after installing the Buttkicker Pro and HaptiConnect software to my DCS setup. I had reported it in the 2.9 Game Performance forum as another solution to the  "Not in Focus" window problem that the User File DCS VR Focus Guard helps address. This is a low overhead script (using AutoHotKey) to check every 200 milliseconds (0.2 seconds) to see if the DCS (in its syntax, Digital Combat Simulator) window is the active window. If not, it makes it the active window.

Link to the forum post: https://forum.dcs.world/topic/340272-dcs-not-remaining-as-active-window/#comment-5351847

An update to this script adding dynamic graphics adjustment: https://forum.dcs.world/topic/345129-dynamic-adjustment-of-lodmult-setting-based-on-mirrors-position-in-cockpit/#comment-5395889

You must download AutoHotKey (www.autohotkey.com, v2.0 and 1.1) for the script to work correctly; install v2.0 first and then 1.1 (which adds backward compatibility.)

Note: to exit the script, right-click the icon in the system tray icon area (far right) and sel ect exit or pause script. Pressing Ctrl & Space simultaneously will stop DCS fr om being the active window, so you can tab out, select another window, etc.

After exiting or pressing Ctrl & Space, you will want to re-run the script for it to keep DCS as the active window.
--
The script is:
#NoEnv
#SingleInstance Force
#UseHook

SetTitleMatchMode, 2    

Loop
{
    if GetKeyState("Control") && GetKeyState("Space")
        break
    
    WinActivate, Digital Combat Simulator
    Sleep, 200  ; Adjust the sleep time (in milliseconds) as needed
}
  • 许可: 免费 - 免费版, 不允许分发
  • 语言: 英文
  • 大小: 304.27 Kb
  • 下载数: 103
  • 评论: 5
标签: Focus, Active Window
关注我们