Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Front Jack Switcher - Win7


  • Please log in to reply
2 replies to this topic
GoDXilE
  • Members
  • 7 posts
  • Last active: Jun 06 2014 07:19 PM
  • Joined: 28 Jan 2013
I hate it so much I don't like plugging and unplugging my headphones just to play a game.
There is probably a better way to do it, but I'm still learning to use AHK so I gave up on looking for it after searching a good 1500 pages.

;Front Jack Switch Hotkey - XilE
;YourKey::
;if (A_PriorHotkey <> "YourKey" or A_TimeSincePriorHotkey > 300) ;Delay time to trigger the event 1000 = 1 second.
;{
;HotKey, YourKey, Off
;Send {YourKey}
;HotKey, YourKey, On
;KeyWait, YourKey
;Return
;}

#NoTrayIcon
#WinActivateForce
SendMode, Input
DetectHiddenWindows, On

RWin:: ; Your hotkey "If you're gonna change it you must change all RWin to your new key." - Blank Template ^^^^
if (A_PriorHotkey <> "RWin" or A_TimeSincePriorHotkey > 300) ; http://stackoverflow...s-in-autohotkey
{
HotKey, RWin, Off
Send {RWin}
HotKey, RWin, On
KeyWait, RWin
Return
}
Run, C:\Program Files\Realtek\Audio\HDA\RAVCpl64.exe, Hide
WinWait, Realtek HD Audio Manager ahk_class #32770
WinSet, Transparent, 0, Realtek HD Audio Manager
ControlClick, Button49, Realtek HD Audio Manager ahk_class #32770,, Left, , Down x10 y14 NA
ControlClick, Button49, Realtek HD Audio Manager ahk_class #32770,, Left, , Up x10 y14 NA
WinWait, Connector Settings ahk_class #32770
WinSet, Transparent, 0, Connector Settings
ControlClick, Button3, Connector Settings ahk_class #32770,, Left, , Down x11 y18 NA
ControlClick, Button3, Connector Settings ahk_class #32770,, Left, , Up x11 y18 NA
ControlClick, Button1, Connector Settings ahk_class #32770,, Left, , Down x53 y15 NA
ControlClick, Button1, Connector Settings ahk_class #32770,, Left, , Up x53 y15 NA
Process,Close,RAVCpl64.exe

Wickster
  • Members
  • 97 posts
  • Last active: Jun 03 2019 03:24 AM
  • Joined: 12 Jan 2013

I had the same problem until I made my own and took a few pieces from others

 

download here : http://www.mediafire...io_switcher.rar

 

 

Code:

#NoEnv
Menu, Tray, Icon, %A_ScriptDir%\audioswitchericon.ico
SetWorkingDir , %A_ScriptDir%
IniRead, deviceone, %A_ScriptDir%\conf.ini, conf, deviceone
IniRead, devicetwo, %A_ScriptDir%\conf.ini, conf, devicetwo
   
F12::
	State:= !State, Device:= !State ? DeviceOne : DeviceTwo
	Run, nircmdc.exe setdefaultsounddevice "%Device%", ,hide
	TrayTip, Device Currently Selected, %Device%,,17
        Return

So open the editor and type the name of your devices for example mine are "speakers" and "Realtek HD Audio 2nd output"

run the program audio switcher

and now press F12 and it should switch between the 2 devices

you can change the F12 button to anything u like just change the script. hope that helps you.



ethannivenl
  • Members
  • 4 posts
  • Last active: Apr 07 2014 04:57 AM
  • Joined: 05 Apr 2014

I'll try your tool Wickster!

 

 

 

 

 

steve barbarich