Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'Win32API'
- getCursorPos = Win32API.new("user32", "GetCursorPos", ['P'], 'V')
- lpPoint = " " * 8 # store two LONGs
- getCursorPos.Call(lpPoint)
- x, y = lpPoint.unpack("LL") # get the actual values
- puts "x:", x, " y:", y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement