Advertisement
Guest User

cursor

a guest
Jun 6th, 2013
521
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CoordMode, ToolTip, screen
  2. CoordMode, Mouse, screen
  3. CoordMode, Pixel, screen
  4. #Persistent
  5.  
  6. ;==============================================================================
  7. ;  simulated 2nd cursor, press F1 swap the positions of the two cursors
  8. ;==============================================================================
  9.  
  10. xloc := A_ScreenWidth/2
  11. yloc := A_ScreenHeight/2
  12. image = cursor.gif   ; <---- you must provide your own cursor image
  13.  
  14. ; load the image and give it a unique name (not shown) so that it can be used later
  15. SplashImage, %image%, B X%xloc% Y%yloc%,,, Cursor2
  16. WinSet, TransColor, Off, Cursor2
  17. WinSet, TransColor, F249FF, Cursor2
  18. return
  19.  
  20. ; in case of emergency, hit escape ;)
  21. esc::exitapp
  22. return
  23.  
  24.  
  25. ;=======================================================
  26. ; swap the positions of the cursors
  27. ;=======================================================
  28.  
  29. `::
  30. blockinput, on ; block keyboard & moouse during the swap
  31.  
  32. MouseGetPos, xpos, ypos
  33. winmove, Cursor2,, %xpos%, %ypos%
  34.  
  35. MouseMove, xloc, yloc ,0
  36. xloc := xpos
  37. yloc := ypos
  38.  
  39. blockinput, off
  40. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement