Ruby 在 Windows 下获取当前鼠标光标的位置
- 作者: 光头强熊大和熊二居然要
- 来源: 51数据库
- 2022-08-12
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
推荐阅读
