- 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
- #该片段来自于http://www.codesnippet.cn/detail/040220132096.html
来源: http://www.codesnippet.cn/detail/040220132096.html