首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

应用Autohotkey控制系统音量

2012-09-17 
使用Autohotkey控制系统音量键盘控制系统音量这个问题,我最开始是使用VolumeEasy这个软件(大学时军哥的推

使用Autohotkey控制系统音量

键盘控制系统音量这个问题,我最开始是使用VolumeEasy这个软件(大学时军哥的推荐),

后来我自己也写过类似的东西,用C#

(因为那时公司管理较严,无法说明跟工作相的关软件禁止安装,日企大家懂的)

使用C#控制系统音量

使用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写的)的文章:

MediaKeys – 为普通键盘添加媒体控制键

?

我写脚本时,参考的AHK文档:

SoundSet

Hotkeys (Mouse, Joystick and Keyboard Shortcuts)

List of Keys, Mouse Buttons, and Joystick Controls

?

?

?

?

热点排行