autohotkey鼠标滚轮

autohotkey鼠标 滚轮

键WheelDown 和键 WheelUp

键WheelLeft 和键 WheelRight

举例

MButton & WheelDown:: ; 中键+下滑
	MsgBox You turned the mouse wheel down while holding down the middle button.
	return
^!WheelUp:: ; alt+ctrl+上滑
	MsgBox You rotated the wheel up while holding down Control+Alt.
	retrun

高级示范

~LControl & WheelUp::  ; 向左滚动.
ControlGetFocus, fcontrol, A
Loop 2  ; <-- 增加这个值来加快滚动速度.
    SendMessage, 0x114, 0, 0, %fcontrol%, A  ; 0x114 是 WM_HSCROLL, 它后面的 0 是 SB_LINELEFT.
return

~LControl & WheelDown::  ; 向右滚动.
ControlGetFocus, fcontrol, A
Loop 2  ; <-- 增加这个值来加快滚动速度.
    SendMessage, 0x114, 1, 0, %fcontrol%, A  ; 0x114 是 WM_HSCROLL, 它后面的 1 是 SB_LINERIGHT.
return

我的实用脚本

按住esc+space, 页面向下滚动三格, 用于当前行居中(打字机模式)
已经将capslock映射为esc

esc & Space::
	Send, {WheelDown 6}
	return

你可能感兴趣的:(autohotkey,autohotkey,每日渐进,autohotkey,鼠标,滚轮)