鼠标教鞭zoomit.ahk 625 B

123456789101112131415161718192021222324252627282930313233343536
  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 : ZoomIn Ctrl+2 改为鼠标右键左滑
  7. ;右键
  8. 触发
  9. global flag := 0
  10. RButton::
  11. minGap = 30 ;
  12. MouseGetPos xpos1,ypos1
  13. Keywait, RButton, U
  14. MouseGetPos xpos2, ypos2
  15. if (xpos2-xpos1 > minGap and abs(ypos1-ypos2)<minGap){
  16. if(flag){
  17. ;send, {Esc}
  18. send, ^{2}
  19. flag := 0
  20. }else{
  21. send, ^{2}
  22. flag := 1
  23. }
  24. }else{
  25. send, {RButton}
  26. }
  27. Return
  28. ; esc::ExitApp