【问题标题】:My script for mute mic is not working, need thoughts and anwers我的静音麦克风脚本不起作用,需要想法和答案
【发布时间】:2018-10-20 16:34:10
【问题描述】:
#NoEnv  
SendMode Input  
SetWorkingDir %A_ScriptDir% 
#SingleInstance force

MuteMic() {
    local MM
    SoundSet, +1, MASTER:1, MUTE, 9 ; my mic is on 9
    SoundGet, MM, MASTER:1, MUTE, 9 ; my mic is on 9
    #Persistent   
    return
}
!Alt+m::MuteMic()

它不起作用,这是我当前的驱动程序。我目前使用的是 Windows 10 版本 1803(内部版本 17134.1)我的热键是 Alt+m。感谢您的帮助和输入! XD

【问题讨论】:

    标签: windows automation autohotkey microphone


    【解决方案1】:

    Master = 扬声器,而不是你的麦克风,所以本质上,你正在静音你的扬声器,而不是你的麦克风(我认为)。

    当您将 Master 替换为 Headphone 或 Microphone 时会发生什么?而且,你能把它从#9 出口移到像#1 之类的更直接的地方吗?

    我发现这个是为了看看你是否真的在 9,https://autohotkey.com/docs/commands/SoundSet.htm#Ex 但你可能已经运行了这个来确定它是在 9。

    【讨论】:

      【解决方案2】:

      您的代码存在问题:

      1. 你的热键定义
      2. 你不需要#Persistent,当然在任何情况下都不需要。

      试试:

      !m::
      MuteMic() {
          SoundSet +1, Microphone:1, MUTE, 9 ; my mic is on 9
          SoundGet MM, Microphone:1, MUTE, 9 ; Why do you do this when you're not using it?
      }
      

      如果您真的不需要MM 的值,可以进一步简化为:

      !m::SoundSet +1, Microphone:1, MUTE, 9
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-10-26
        • 1970-01-01
        • 1970-01-01
        • 2019-08-28
        • 2021-06-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多