[AHK-] 鼠标助手 以鼠标送出键盘热键

楼主: Ayiyaya (逸)   2018-09-15 12:00:47
https://i.imgur.com/3ie6ePt.png
说明:
以鼠标送出键盘热键,前一版是 #1Oo8FRfW (EzHotKey)
压着左键再按右键 (或同时压左右键) 送出指令:
Ctrl+W:关闭浏览器分页,或部份视窗程式
压着右键同时卷动滚轮,送出指令:
【分页浏览】 Ctrl+PgUp/PgDn:在浏览器里切换分页
【浏览器缩放】Ctrl+Plus/Minus:在浏览器里进行缩放
【视窗放大镜】WinKey+PgUp/PgDn:执行 Magnify.exe
压着右键再按左键,送出指令:
【分页浏览】 Ctrl+T:在浏览器里开新分页
【浏览器缩放】Ctrl+0:在浏览器里恢复缩放
【视窗放大镜】WinKey+PgDn 数次:恢复原比例
※ 部份操作必须先点击视窗或网页空白处,取得操作焦点
※ 压着左键/右键再按中键,快速切换指令
脚本:
#SingleInstance force
Gui, +ToolWindow +AlwaysOnTop
Gui, Show, x800 y750 h57 w100, 鼠标助手
Gui, Add, Button, x2 y2 w50 h50, Ctrl+W
Gui, Add, Button, x83 y1 h18 w17 gHelp,?
Gui, Add, Radio, x54 y2 w30 h18 vRadioButton1 checked, 分
Gui, Add, Radio, x54 y20 w30 h18 vRadioButton2, 浏
Gui, Add, Radio, x54 y38 w30 h18 vRadioButton3, 大
Return
Help:
MsgBox, 64, 鼠标助手, (如文章开头故省略)
Return
RButton::send {RButton}
Return
~LButton & RButton::send ^w
Return
RButton & MButton::
GuiControlGet, RadioButton1
GuiControlGet, RadioButton2
GuiControlGet, RadioButton3
if (RadioButton1 = 1) {
GuiControl,, RadioButton2, 1
ToolTip, 使用 浏览器缩放, x+20, y
sleep 600
ToolTip
}
else if (RadioButton2) = 1 {
GuiControl,, RadioButton3, 1
ToolTip, 使用 视窗放大镜, x+20, y
sleep 600
ToolTip
}
else if (RadioButton3) = 1 {
GuiControl,, RadioButton1, 1
ToolTip, 使用 切换分页, x+20, y
sleep 600
ToolTip
}
Return
LButton & MButton::
GuiControlGet, RadioButton1
GuiControlGet, RadioButton2
GuiControlGet, RadioButton3
if (RadioButton1 = 1) {
GuiControl,, RadioButton3, 1
ToolTip, 使用 视窗放大镜, x+20, y
sleep 600
ToolTip
}
else if (RadioButton2) = 1 {
GuiControl,, RadioButton1, 1
ToolTip, 使用 切换分页, x+20, y
sleep 600
ToolTip
}
else if (RadioButton3) = 1 {
GuiControl,, RadioButton2, 1
ToolTip, 使用 浏览器缩放, x+20, y
sleep 600
ToolTip
}
Return
RButton & WheelUp::
GuiControlGet, RadioButton1
GuiControlGet, RadioButton2
GuiControlGet, RadioButton3
if RadioButton1 = 1
send ^{PgUp}
if RadioButton2 = 1
send ^{=}
if RadioButton3 = 1
send #{=}
Return
RButton & WheelDown::
GuiControlGet, RadioButton1
GuiControlGet, RadioButton2
GuiControlGet, RadioButton3
if RadioButton1 = 1
send ^{PgDn}
if RadioButton2 = 1
send ^{-}
if RadioButton3 = 1
send #{-}
Return
RButton & LButton::
GuiControlGet, RadioButton1
GuiControlGet, RadioButton2
GuiControlGet, RadioButton3
if RadioButton1 = 1
send ^t
if RadioButton2 = 1
send ^{0}
if RadioButton3 = 1
Loop, 15
{
send #{-}
sleep 40
}
Return
ButtonCtrl+W:
MouseMove, -50, -100, 1, R
send {LButton}
send ^w
Return
GuiClose:
ExitApp
作者: jamteam (生而为人)   2017-02-06 13:22:00
不考虑抓个Xmouse吗?

Links booklink

Contact Us: admin [ a t ] ucptt.com