Advertisement
Guest User

Untitled

a guest
Apr 30th, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. require 'Win32API'
  2.  
  3. getCursorPos = Win32API.new("user32", "GetCursorPos", ['P'], 'V')
  4. lpPoint = " " * 8 # store two LONGs
  5. getCursorPos.Call(lpPoint)
  6. x, y = lpPoint.unpack("LL") # get the actual values
  7. puts "x:", x, " y:", y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement