jeffharbert

Move cursor to center of active window with AutoHotKey

Jun 15th, 2016
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Move cursor to center of windows after using ALT-TAB
  2. ~!Tab::
  3. KeyWait, Alt
  4. KeyWait, Tab
  5. WinGetActiveStats, Title, Width, Height, X, Y
  6. Sleep 1250
  7. MouseMove, Width / 2, Height / 2, 0
  8. return
  9.  
  10. ;Move cursor to center of active window with SHIFT+CTRL+C
  11. +^c::
  12. WinGetActiveStats, Title, Width, Height, X, Y
  13. MouseMove, Width / 2, Height / 2, 0
  14. Return
Advertisement
Add Comment
Please, Sign In to add comment