disabling a audio device

Get help with using AutoHotkey and its commands and hotkeys
dsdsds12
Posts: 7
Joined: 20 Apr 2014, 03:20

disabling a audio device

20 Apr 2014, 10:02

I tried several methods but none of the works properly
when I try to disable via devcon it ask for reboot so not an option
with nircmd I had some look
1.using nircmd I created 2 .BAT files one of then sets the speaker as default audio device other one sets the headphone as default
2.I named them 1 and 2
3.I made another .BAT file as 'audio switcher' and wrote this in the file

Code: Select all

call 1.BAT
rename 1.BAT 3.BAT
rename 2.BAT 1.BAT
rename 3.BAT 2.BAT
what it does is fist it runs 1.BAT and then it interchange the names of 1.BAT and 2.BAT so,every time when I double click on audio switch it changes the default audio device. there by eliminating the necessity of 2 icons on my desktop :). but the problem is I don't want this, since it only changes the default audio device if my headphone pin comes off my audio jack audio will come through my speakers ! which I definitely don't want

what I want is a two scripts (or one) which disable/enables 'speakers'.then I can make speakers as my default device. when it gets disabled, sound will automatically come through my headphone and vice versa. is it possible via AHK scripts?
I've got a rough idea or call it an algorithm if you may (I know it's sounds stupid)
Idea

Return to “Ask For Help”

Who is online

Users browsing this forum: guischmo, roysubs and 311 guests