mousey - change the cursor

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
BGM
Posts: 507
Joined: 20 Nov 2013, 20:56
Contact:

mousey - change the cursor

19 Jun 2015, 10:01

Do you want to easily change the mouse cursor when you move the mouse over a control?
Enter mousey!

All you have to do is to create a new mousey handle.

Example

Code: Select all

;mousey example
;sample change of mouse cursor on mouseover
#SingleInstance, On
#NoEnv
SetBatchLines, -1
gui, add, text, hwndmouseytext,Mousey Crosshairs
gui, add, button, gguiclose,EXIT (non-mousey)
gui, add, text, hwndhandytext,Mouse Hand
mousey_cursor := mousey_init(mouseytext,"crosshair")
handy_cursor := mousey_init(handytext,"hand")
gui, show
return

guiclose:
	mousey_close(mousey_cursor)
	mousey_close(handy_cursor)
	exitapp
return
mousey library
Spoiler
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: mousey - change the cursor

19 Jun 2015, 10:23

Sometimes it will flicker while moving the mouse across a control, and both the new cursor and the default cursor can be seen at the same time.
User avatar
BGM
Posts: 507
Joined: 20 Nov 2013, 20:56
Contact:

Re: mousey - change the cursor

19 Jun 2015, 10:57

Well, I guess I'll have to work on that part...
It seems to flicker more with the crosshairs than with the hand cursor, though.
just me
Posts: 9453
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: mousey - change the cursor

20 Jun 2015, 04:38

You might be interested in the WM_SETCURSOR notification. For static controls like Text and Pic the notification will be received only if the control has a g-label or the SS_NOTIFY (+0x0100) style.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: Holarctic and 132 guests