my other try,
Mouse is on Position give a Number Pad 5
Mouse is in Position 920 < x < 960 and 520 < y < 560 work fine
but it give no Key.NumberPad5 out
how i can do this?
Code: Select all
class POINT(Structure):
_fields_ = [("x", c_long), ("y", c_long)]
def queryMousePosition():
pt = POINT()
windll.user32.GetCursorPos(byref(pt))
return { "x": pt.x, "y": pt.y}
pos = queryMousePosition()
x = pos["x"]
y = pos["y"]
diagnostics.watch("x:" + str(x) + ", y:" + str(y))
if 920 < x < 960 and 520 < y < 560:
windll.user32.keyboard.setKey(Key.NumberPad5)