Ruby 在 Windows 下获取当前鼠标光标的位置

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

result = "0"*8   # Eight bytes (enough for two longs)
getCursorXY = Win32API.new("user32","GetCursorPos",["P"],"V")
getCursorXY.call(result)
x, y = result.unpack("LL")  # Two longs