SetBatchLines -1
SplashTextOn,,, 收集声卡信息...
; https://www.autohotkey.com/boards/viewtopic.php?f=6&t=15509
; Most of the pure numbers below probably don't exist in any mixer, but they're queried for completeness.
; The numbers correspond to the following items (in order): CUSTOM, BOOLEANMETER, SIGNEDMETER, PEAKMETER,
; UNSIGNEDMETER, BOOLEAN, BUTTON, DECIBELS, SIGNED, UNSIGNED, PERCENT, SLIDER, FADER, SINGLESELECT, MUX,
; MULTIPLESELECT, MIXER, MICROTIME, MILLITIME
ControlTypes = VOLUME,ONOFF,MUTE,MONO,LOUDNESS,STEREOENH,BASSBOOST,PAN,QSOUNDPAN,BASS,TREBLE,EQUALIZER,0x00000000, 0x10010000,0x10020000,0x10020001,0x10030000,0x20010000,0x21010000,0x30040000,0x30020000,0x30030000,0x30050000,0x40020000,0x50030000,0x70010000,0x70010001,0x71010000,0x71010001,0x60030000,0x61030000
ComponentTypes = MASTER,HEADPHONES,DIGITAL,LINE,MICROPHONE,SYNTH,CD,TELEPHONE,PCSPEAKER,WAVE,AUX,ANALOG,N/A
; Create a ListView and prepare for the main loop:
Gui, Add, Listview, w400 h400 vMyListView, Component Type|Control Type|Setting|Mixer
LV_ModifyCol(4, "Integer")
SetFormat, Float, 0.2 ; Limit number of decimal places in percentages to two.
Loop ; 对于系统中存在的每个混音器编号,查询其能力。
{
CurrMixer := A_Index
SoundGet, Setting,,, %CurrMixer%
if ErrorLevel = Can't Open Specified Mixer ; 除此以外的任何错误都表明混频器存在。
break
; 对于此混音器中存在的每个组件类型,查询其实例和控件类型:
Loop, parse, ComponentTypes, `,
{
CurrComponent := A_LoopField
; 首先检查混音器中是否存在这种组件类型:
SoundGet, Setting, %CurrComponent%,, %CurrMixer%
if ErrorLevel = Mixer Doesn't Support This Component Type
continue ; 开始一个新的迭代以移动到下一个组件类型。
Loop ; 对于此组件类型的每个实例,查询其控件类型。
{
CurrInstance := A_Index
; 首先检查这个实例的这个实例是否甚至存在于混音器中:
SoundGet, Setting, %CurrComponent%:%CurrInstance%,, %CurrMixer%
; 检查以下两个错误允许此脚本在旧版本上运行:
if ErrorLevel in Mixer Doesn't Have That Many of That Component Type,Invalid Control Type or Component Type
break ; 不再有此组件类型的实例。
; 获取此组件的此实例中存在的每个控件类型的当前设置:
Loop, parse, ControlTypes, `,
{
CurrControl := A_LoopField
SoundGet, Setting, %CurrComponent%:%CurrInstance%, %CurrControl%, %CurrMixer%
; 检查以下两个错误允许此脚本在旧版本上运行:
if ErrorLevel in Component Doesn't Support This Control Type,Invalid Control Type or Component Type
continue
if ErrorLevel ; 其他一些意外错误,因此请在结果中显示。
Setting := ErrorLevel
ComponentString := CurrComponent
if CurrInstance > 1
ComponentString = %ComponentString%:%CurrInstance%
LV_Add("", ComponentString, CurrControl, Setting, CurrMixer)
} ; 对于每个控件类型。
} ; 对于每个组件实例。
} ; 对于每个组件类型。
} ; 对于每个混音器。
Loop % LV_GetCount("Col") ; Auto-size each column to fit its contents.
LV_ModifyCol(A_Index, "AutoHdr")
SplashTextOff
Gui, Show
return
GuiClose:
ExitApp
F1::
SoundSet, +1, , mute,7 ;12 是我的麦克风 ID 号,使用虚线下方的代码查找您的麦克风 ID。您需要更换所有 12 个 <----------重要
SoundGet, master_mute, , mute, 7
ToolTip, Mute %master_mute% ;在鼠标指针处使用工具提示来显示切换后麦克风的状态
SetTimer, RemoveToolTip, 1000
return
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
SetBatchLines -1
SplashTextOn,,, 收集声卡信息...
; https://www.autohotkey.com/boards/viewtopic.php?f=6&t=15509
; Most of the pure numbers below probably don't exist in any mixer, but they're queried for completeness.
; The numbers correspond to the following items (in order): CUSTOM, BOOLEANMETER, SIGNEDMETER, PEAKMETER,
; UNSIGNEDMETER, BOOLEAN, BUTTON, DECIBELS, SIGNED, UNSIGNED, PERCENT, SLIDER, FADER, SINGLESELECT, MUX,
; MULTIPLESELECT, MIXER, MICROTIME, MILLITIME
ControlTypes = VOLUME,ONOFF,MUTE,MONO,LOUDNESS,STEREOENH,BASSBOOST,PAN,QSOUNDPAN,BASS,TREBLE,EQUALIZER,0x00000000, 0x10010000,0x10020000,0x10020001,0x10030000,0x20010000,0x21010000,0x30040000,0x30020000,0x30030000,0x30050000,0x40020000,0x50030000,0x70010000,0x70010001,0x71010000,0x71010001,0x60030000,0x61030000
ComponentTypes = MASTER,HEADPHONES,DIGITAL,LINE,MICROPHONE,SYNTH,CD,TELEPHONE,PCSPEAKER,WAVE,AUX,ANALOG,N/A
; Create a ListView and prepare for the main loop:
Gui, Add, Listview, w400 h400 vMyListView, Component Type|Control Type|Setting|Mixer
LV_ModifyCol(4, "Integer")
SetFormat, Float, 0.2 ; Limit number of decimal places in percentages to two.
Loop ; 对于系统中存在的每个混音器编号,查询其能力。
{
CurrMixer := A_Index
SoundGet, Setting,,, %CurrMixer%
if ErrorLevel = Can't Open Specified Mixer ; 除此以外的任何错误都表明混频器存在。
break
; 对于此混音器中存在的每个组件类型,查询其实例和控件类型:
Loop, parse, ComponentTypes, `,
{
CurrComponent := A_LoopField
; 首先检查混音器中是否存在这种组件类型:
SoundGet, Setting, %CurrComponent%,, %CurrMixer%
if ErrorLevel = Mixer Doesn't Support This Component Type
continue ; 开始一个新的迭代以移动到下一个组件类型。
Loop ; 对于此组件类型的每个实例,查询其控件类型。
{
CurrInstance := A_Index
; 首先检查这个实例的这个实例是否甚至存在于混音器中:
SoundGet, Setting, %CurrComponent%:%CurrInstance%,, %CurrMixer%
; 检查以下两个错误允许此脚本在旧版本上运行:
if ErrorLevel in Mixer Doesn't Have That Many of That Component Type,Invalid Control Type or Component Type
break ; 不再有此组件类型的实例。
; 获取此组件的此实例中存在的每个控件类型的当前设置:
Loop, parse, ControlTypes, `,
{
CurrControl := A_LoopField
SoundGet, Setting, %CurrComponent%:%CurrInstance%, %CurrControl%, %CurrMixer%
; 检查以下两个错误允许此脚本在旧版本上运行:
if ErrorLevel in Component Doesn't Support This Control Type,Invalid Control Type or Component Type
continue
if ErrorLevel ; 其他一些意外错误,因此请在结果中显示。
Setting := ErrorLevel
ComponentString := CurrComponent
if CurrInstance > 1
ComponentString = %ComponentString%:%CurrInstance%
LV_Add("", ComponentString, CurrControl, Setting, CurrMixer)
} ; 对于每个控件类型。
} ; 对于每个组件实例。
} ; 对于每个组件类型。
} ; 对于每个混音器。
Loop % LV_GetCount("Col") ; Auto-size each column to fit its contents.
LV_ModifyCol(A_Index, "AutoHdr")
SplashTextOff
Gui, Show
return
GuiClose:
ExitApp
F1::
SoundSet, +1, , mute,7 ;12 是我的麦克风 ID 号,使用虚线下方的代码查找您的麦克风 ID。您需要更换所有 12 个 <----------重要
SoundGet, master_mute, , mute, 7
ToolTip, Mute %master_mute% ;在鼠标指针处使用工具提示来显示切换后麦克风的状态
SetTimer, RemoveToolTip, 1000
return
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
SetBatchLines -1
SplashTextOn,,, 收集声卡信息...
; https://www.autohotkey.com/boards/viewtopic.php?f=6&t=15509
; Most of the pure numbers below probably don't exist in any mixer, but they're queried for completeness.
; The numbers correspond to the following items (in order): CUSTOM, BOOLEANMETER, SIGNEDMETER, PEAKMETER,
; UNSIGNEDMETER, BOOLEAN, BUTTON, DECIBELS, SIGNED, UNSIGNED, PERCENT, SLIDER, FADER, SINGLESELECT, MUX,
; MULTIPLESELECT, MIXER, MICROTIME, MILLITIME
ControlTypes = VOLUME,ONOFF,MUTE,MONO,LOUDNESS,STEREOENH,BASSBOOST,PAN,QSOUNDPAN,BASS,TREBLE,EQUALIZER,0x00000000, 0x10010000,0x10020000,0x10020001,0x10030000,0x20010000,0x21010000,0x30040000,0x30020000,0x30030000,0x30050000,0x40020000,0x50030000,0x70010000,0x70010001,0x71010000,0x71010001,0x60030000,0x61030000
ComponentTypes = MASTER,HEADPHONES,DIGITAL,LINE,MICROPHONE,SYNTH,CD,TELEPHONE,PCSPEAKER,WAVE,AUX,ANALOG,N/A
; Create a ListView and prepare for the main loop:
Gui, Add, Listview, w400 h400 vMyListView, Component Type|Control Type|Setting|Mixer
LV_ModifyCol(4, "Integer")
SetFormat, Float, 0.2 ; Limit number of decimal places in percentages to two.
Loop ; 对于系统中存在的每个混音器编号,查询其能力。
{
CurrMixer := A_Index
SoundGet, Setting,,, %CurrMixer%
if ErrorLevel = Can't Open Specified Mixer ; 除此以外的任何错误都表明混频器存在。
break
; 对于此混音器中存在的每个组件类型,查询其实例和控件类型:
Loop, parse, ComponentTypes, `,
{
CurrComponent := A_LoopField
; 首先检查混音器中是否存在这种组件类型:
SoundGet, Setting, %CurrComponent%,, %CurrMixer%
if ErrorLevel = Mixer Doesn't Support This Component Type
continue ; 开始一个新的迭代以移动到下一个组件类型。
Loop ; 对于此组件类型的每个实例,查询其控件类型。
{
CurrInstance := A_Index
; 首先检查这个实例的这个实例是否甚至存在于混音器中:
SoundGet, Setting, %CurrComponent%:%CurrInstance%,, %CurrMixer%
; 检查以下两个错误允许此脚本在旧版本上运行:
if ErrorLevel in Mixer Doesn't Have That Many of That Component Type,Invalid Control Type or Component Type
break ; 不再有此组件类型的实例。
; 获取此组件的此实例中存在的每个控件类型的当前设置:
Loop, parse, ControlTypes, `,
{
CurrControl := A_LoopField
SoundGet, Setting, %CurrComponent%:%CurrInstance%, %CurrControl%, %CurrMixer%
; 检查以下两个错误允许此脚本在旧版本上运行:
if ErrorLevel in Component Doesn't Support This Control Type,Invalid Control Type or Component Type
continue
if ErrorLevel ; 其他一些意外错误,因此请在结果中显示。
Setting := ErrorLevel
ComponentString := CurrComponent
if CurrInstance > 1
ComponentString = %ComponentString%:%CurrInstance%
LV_Add("", ComponentString, CurrControl, Setting, CurrMixer)
} ; 对于每个控件类型。
} ; 对于每个组件实例。
} ; 对于每个组件类型。
} ; 对于每个混音器。
Loop % LV_GetCount("Col") ; Auto-size each column to fit its contents.
LV_ModifyCol(A_Index, "AutoHdr")
SplashTextOff
Gui, Show
return
GuiClose:
ExitApp
F1::
SoundSet, +1, , mute,7 ;12 是我的麦克风 ID 号,使用虚线下方的代码查找您的麦克风 ID。您需要更换所有 12 个 <----------重要
SoundGet, master_mute, , mute, 7
ToolTip, Mute %master_mute% ;在鼠标指针处使用工具提示来显示切换后麦克风的状态
SetTimer, RemoveToolTip, 1000
return
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
声明:站内资源为整理优化好的代码上传分享与学习研究,如果是开源代码基本都会标明出处,方便大家扩展学习路径。请不要恶意搬运,破坏站长辛苦整理维护的劳动成果。本站为爱好者分享站点,所有内容不作为商业行为。如若本站上传内容侵犯了原著者的合法权益,请联系我们进行删除下架。
评论(0)