Created
April 28, 2019 11:12
-
-
Save Epskampie/ca5da58951f083b0b4a190977f234008 to your computer and use it in GitHub Desktop.
Autohotkey fullscreen/windowed and mute/unmute game with one button (scroll lock)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Download NirCmd.exe and put it in a "Lib" folder next to this script | |
; https://www.nirsoft.net/utils/nircmd.html | |
winTitle := "Forza Motorsport 7" | |
procName := "forzamotorsport7.exe" | |
Pause:: | |
Run, "Lib\nircmd.exe" muteappvolume %procName% 2 | |
return | |
ScrollLock:: | |
If WinExist(winTitle) { | |
; MsgBox maximize | |
Run, "Lib\nircmd.exe" muteappvolume %procName% 0 | |
WinActivate ; use the window found above | |
Sleep, 100 | |
SendInput, #+{Enter} ; Send Win+Shift+Enter | |
} else { | |
; MsgBox minimize | |
Run, "Lib\nircmd.exe" muteappvolume %procName% 1 | |
SendInput, #+{Enter} ; Send Win+Shift+Enter | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment