autohotkey
; 减小音量
~WheelDown:: {
CoordMode "Mouse"
MouseGetPos &x, &y
if (y = 0) {
Send "{Volume_Down}"
}
}
; 增大音量
~WheelUp:: {
CoordMode "Mouse"
MouseGetPos &x, &y
if (y = 0) {
Send "{Volume_Up}"
}
}
; 按下鼠标中键音量为0
~MButton::{
CoordMode "Mouse"
MouseGetPos &x, &y
if (y = 0) {
SoundSetVolume 0
}
}
; 侧键搜索选中内容,通过config.ini里面的配置决定使用哪个搜索引擎
XButton1:: {
A_Clipboard := ""
Send "^c"
ClipWait 0.2
if (A_Clipboard = "") {
} else {
if (IniRead("config.ini", "搜索引擎", "必应")) {
Run "https://cn.bing.com/search?q=" A_Clipboard
} else if (IniRead("config.ini", "搜索引擎", "百度")) {
Run "https://www.baidu.com/s?wd=" A_Clipboard
} else if (IniRead("config.ini", "搜索引擎", "哔哩哔哩")) {
Run "https://search.bilibili.com/all?keyword=" A_Clipboard
}
}
}
autohotkey
; 复制http网址到思源时自动添加<>
~^v::{
if(SubStr(A_Clipboard,1,4) = "http" && WinActive("思源")){
newtxt := "<" . A_Clipboard . ">"
A_Clipboard := newtxt
}
}