係 Win11 用 AutoHotkey v2.0.2 再試過,係 Excel 及其他 Software(eg. Chrome, Notepad, Notepad++, 小畫家...etc)試過,可用 Right Button + Wheel 做左/右 Scroll。
不過有小小 Bug ,剛剛開第一個 Excel 係用不到 Right button + Wheel,開 Excel 後求 Click 一 Click 去 Excel 以外的地方(eg. Click 落 Task bar、其他已開啟的程式...etc,甚至乎再開另一個 Excel),再走返入 Excel 就會用得。當所有 Excel 都已關閉,下次再開 Excel 都要這樣做一次。- onerror myError
- myError(exception, mode)
- {
- return true
- }
- RButton::RButton
- ; Mouse Right Button + Wheel for Left/Right Scrolling in Excel
- #HotIf WinActive("ahk_class XLMAIN") ; for Excel
- RButton & WheelDown::{
- ComObjActive("Excel.Application").ActiveWindow.SmallScroll(0,0,0,3)
- }
- RButton & WheelUp::{
- ComObjActive("Excel.Application").ActiveWindow.SmallScroll(0,0,3,0)
- }
- #HotIf ; for other window
- RButton & WheelDown::WheelLeft
- RButton & WheelUp::WheelRight
複製代碼 |