键盘控制系统音量这个问题,我最开始是使用VolumeEasy这个软件(大学时军哥的推荐),
后来我自己也写过类似的东西,用C#
(因为那时公司管理较严,无法说明跟工作相的关软件禁止安装,日企大家懂的)
今天,在公司换了台新电脑,win7_64的,
配置这台电脑的时候,用Autohotkey重写了这个功能,
发现还是AHK好。脚本如下
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
^NumpadSub::
;MsgBox Pressing either Control+Numpad0 or Control+Numpad1 will display this message.
Send {Volume_Down 5} ; Lower the master volume by 3 intervals.
return
^NumpadAdd::
;MsgBox Pressing either Control+Numpad0 or Control+Numpad1 will display this message.
Send {Volume_Up 5} ; Raise the master volume by 1 interval (typically 5%).
return
^NumpadMult::
Send {Volume_Mute} ; Mute/unmute the master volume.
return
参考链接
小众软件上面有篇介绍MediaKeys(使用AHK写的)的文章:
我写脚本时,参考的AHK文档:
Hotkeys (Mouse, Joystick and Keyboard Shortcuts)
List of Keys, Mouse Buttons, and Joystick Controls
本文介绍了如何使用AutoHotkey (AHK) 脚本来控制Windows系统的音量,包括静音、增大和减小音量的功能,并提供了具体的脚本示例。
98

被折叠的 条评论
为什么被折叠?



