| #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
| ; #Warn ; Enable warnings to assist with detecting common errors. | |
| SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
| SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
| Loop | |
| { | |
| ; check if steamvr is running. | |
| If ProcessExist("vrmonitor.exe") and !ProcessExist("cmd.exe"){ | |
| ; new if statement for each game | |
| If ProcessExist("X-Plane.exe") { | |
| Run "C:\Users\..\Desktop\steam-vr-gamepad.bat - Shortcut" | |
| } | |
| If ProcessExist("Il-2.exe") { | |
| Run "C:\Users\..\Desktop\steam-vr-gamepad.bat - Shortcut" | |
| } | |
| If ProcessExist("DCS.exe") { | |
| Run "C:\Users\..\Desktop\steam-vr-gamepad.bat - Shortcut" | |
| } | |
| } | |
| ; steamvr is closed but wheel is still running. close steamvrwheel | |
| If !ProcessExist("vrmonitor.exe") and ProcessExist("python.exe"){ | |
| Process,Close,python.exe | |
| } | |
| If !ProcessExist("vrmonitor.exe") and ProcessExist("cmd.exe"){ | |
| Process,Close,cmd.exe | |
| } | |
| ; run this loop every 5000. peformance? | |
| Sleep 5000 | |
| } | |
| ProcessExist(Name){ | |
| Process,Exist,%Name% | |
| return Errorlevel | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
xhecksum commentedJul 27, 2017
•
edited
This script automaps the Vive wands to be a gamepad when you launch a game.
Works with steam-vr-wheel script found here
https://github.com/mdovgialo/steam-vr-wheel
Instructions:
install Autohotkey and put this script in the Windows 10 startup folder.
You need to edit game list starting at line 14. and change the hard coded paths to steam-vr-gamepad.bat - Shortcut (needs to be a shortcut)