我正在 AutoHotkey 中编写一个脚本,以允许我使用 Dell AT101W 键盘控制计算机的音量(因为 Windows 中没有设置用于控制此类内容的键,并且该键盘没有编入控件)。
到目前为止我所拥有的:
^!(whatever the up arrow is) ; What is up?
SoundSet +2
^!(whatever the down arrow is) ; What is down?
SoundSet -2
我不完全确定那里的音量命令是否正确,但我完全不知道如何让它识别向上和向下箭头键(我不知道它们是什么)。示例脚本值得赞赏,但绝不是必需的。
最佳答案
其实很简单,就是Up
和 Down
.
这是一个工作脚本,它设置一个托盘消息气球,在更改后通知您新卷:
^!Up::
SoundSet +2
GoSub DisplayCurrentVolume
Return
^!Down::
SoundSet -2
GoSub DisplayCurrentVolume
Return
DisplayCurrentVolume:
SoundGet, volume
volume := Ceil(volume) ; Round up
TrayTip, Volume Adjusted, Volume changed to %volume%`%, 5, 1
Return
关于autohotkey - 如何在 autohotkey 中设置箭头热键?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26854680/