Excel表格左右移动.ahk 655 B

123456789101112131415161718192021
  1. ; @Author : liuyuqi
  2. ; @Contact : liuyuqi.gov@msn.cn
  3. ; @Time : 2019/08/05 07:06:02
  4. ; @Version : 1.0
  5. ; @License : (C)Copyright 2019 liuyuqi.
  6. ; @Desc : Shift+鼠标滚轮: Excel表格左右移动
  7. #IfWinActive , ahk_exe EXCEL.EXE
  8. ~LShift & WheelUp::
  9. ControlGetFocus, fcontrol, A
  10. Loop 5
  11. ComObjActive("Excel.application").ActiveWindow.SmallScroll(0,0,0,1)
  12. Return
  13. ~LShift & WheelDown::
  14. ControlGetFocus, fcontrol, A
  15. Loop 5 ; <-- Increase or decrease this value to scroll faster or slower.
  16. ComObjActive("Excel.application").ActiveWindow.SmallScroll(0,0,1,0)
  17. Return
  18. #IfWinActive