Jump to content

Win 10/11 Mouse pointer get/set ( color too )


Go to solution Solved by argumentum,

Recommended Posts

  • argumentum changed the title to Win 10/11 Mouse pointer get/set ( color too )
  • Solution
Posted
#include <WinAPIRes.au3> ; _WinAPI_SetSystemCursor()
#include <WinAPISys.au3> ; _WinAPI_SystemParametersInfo()
#include <WinAPIsysinfoConstants.au3> ; for $SPI_SETCURSORS

;~ Local $hPrev = _WinAPI_CopyCursor(_WinAPI_LoadCursor(0, $OCR_NORMAL)) ; Is not going to be used because ...
_WinAPI_SetSystemCursor(_WinAPI_LoadCursorFromFile(StringLeft(@AutoItExe, _
        StringInStr(@AutoItExe, '\', 0, -1) -1) & '\Examples\Helpfile\Extras\Lens.cur'), $OCR_NORMAL)
Sleep(5000)
;~ _WinAPI_SetSystemCursor($hPrev, $OCR_NORMAL) ... we are gonna use SystemParametersInfo
_WinAPI_SystemParametersInfo($SPI_SETCURSORS, 0, 0, 0)

My drama was to restore the original back and the above does just that.
The get part is in the registry. 

  Reveal hidden contents

Unless someone finds something better, then its solved.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...