Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
autohotkey-scripts/steamBigPictureAudioDeviceSwitch.ahk
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
20 lines (18 sloc)
647 Bytes
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
| ; This script checks each 5s if Steam is running in Big Picture mode and switch audio device | |
| ; Additional software (eg. AudioSwitcher) that allows to switch audio devices with hotkeys is needed | |
| ; Here CTRL+ALT+NUMPAD1 and CTRL+ALT+NUMPAD2 switch between PC speakers and TV HDMI. | |
| ; When Steam Big Picture is detected audio is changed to HDMI, and returning to PC after SBP close. | |
| #Persistent ;keep the script running | |
| SetTimer, sbp , 5000 | |
| sbp: | |
| IfWinExist, ahk_class CUIEngineWin32 | |
| { | |
| If (not defaudio = "TV") | |
| { | |
| Send, ^!{Numpad2} | |
| defaudio := "TV" | |
| } | |
| } else if (not defaudio = "PC") { | |
| Send, ^!{Numpad1} | |
| defaudio := "PC" | |
| } |