Am 04.02.2014 19:51, schrieb reckoner:
> Hi,
>
> In the control panel, under mouse settings, there is a checkbox to
> automatically move the mouse to the "default button in a dialog box".
>
> Is there a way to programmatically turn this off/on using Python? I'm
> referring to windows 7/8.
>
> Thanks!
SystemParametersInfo with the SPI_SETSNAPTODEFBUTTON parameter.
No idea if pywin32 exposes this but there's always ctypes.
Thanks for the tip! For posterity, here it is:
def set_mouse_autosnap_to_default(state):
"""The mouse is auto-positioned in the control panel. This turns
on/off this
auto-snap.
:state: True/False (set to bool)
"""
h = ctypes.c_void_p()
# set postion
ctypes.windll.user32.SystemParametersInfoW(0x60,state,ctypes.byref(h),0)
# recover position
# print
ctypes.windll.user32.SystemParametersInfoW(0x5F,0,ctypes.byref(h),0)
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32