Guest User

Untitled

a guest
Sep 30th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. cos_mousedrag_treshold := 20 ; pixels
  2.  
  3.  
  4. #IfWinNotActive ahk_class ConsoleWindowClass
  5.  
  6. ~lButton::
  7. MouseGetPos, cos_mousedrag_x, cos_mousedrag_y
  8. keywait lbutton
  9. mousegetpos, cos_mousedrag_x2, cos_mousedrag_y2
  10. if (abs(cos_mousedrag_x2 - cos_mousedrag_x) > cos_mousedrag_treshold
  11. or abs(cos_mousedrag_y2 - cos_mousedrag_y) > cos_mousedrag_treshold)
  12. {
  13. wingetclass cos_class, A
  14. if (cos_class == "Emacs")
  15. sendinput !w
  16. else
  17. sendinput ^c
  18. }
  19. return
  20.  
  21. ~mbutton::
  22. WinGetClass cos_class, A
  23. if (cos_class == "Emacs")
  24. SendInput ^y
  25. else
  26. SendInput ^v
  27. return
  28.  
  29. #IfWinNotActive
  30.  
  31.  
  32. ;; clipx
  33. ^mbutton::
  34. sendinput ^+{insert}
  35. return
Add Comment
Please, Sign In to add comment