Change cursor of current pointer

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 1131
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Change cursor of current pointer

Post by Grovkillen » Wed Mar 20, 2024 9:22 am

USE WITH CARE, it will apply to whatever cursor handle you have active when you start the script! A restart will always fix any problem with the wrong cursor being used. Or just revert to the default cursor theme (run: control /name Microsoft.Mouse)

This old post inspired me: viewtopic.php?f=9&t=10688

Code: Select all

LibFunc>user32,GetCursor,CURSOR_HANDLE,
LibFunc>user32,SetSystemCursor,res,CURSOR_HANDLE,32513

/*
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setsystemcursor
OCR_NORMAL=32512    Normal select
OCR_IBEAM=32513     Text select
OCR_WAIT=32514      Busy
OCR_CROSS=32515     Precision select
OCR_UP=32516        Alternate select
OCR_SIZENWSE=32642  Diagonal resize 1
OCR_SIZENESW=32643  Diagonal resize 2
OCR_SIZEWE=32644    Horizontal resize
OCR_SIZENS=32645    Vertical resize
OCR_SIZEALL=32646   Move
OCR_NO=32648        Unavailable
OCR_HAND=32649	    Link select
OCR_APPSTARTING=32650	Working in background
*/
Let>ME=%Script%

Running: 15.0.27
version history

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts