| Code: |
| import bpy
from ctypes import * # point structure definition class POINT(Structure): _fields_ = [("x", c_ulong), ("y", c_ulong)] # Gets cursor position (windows only) def getCursorPos(): pt = POINT() windll.user32.GetCursorPos(byref(pt)) return pt.x, pt.y # Sets cursor position (windows only) def setCursorPos(x, y): windll.user32.SetCursorPos(x, y) # example x, y = getCursorPos() setCursorPos(x + 100, y) |