I ran into a small problem and I’m not sure how I, or if it is even possible to solve this.
As the title suggests I want to confine my mouse cursor to a certain part of the desktop.
I do that with the help of this at the beginning of the script:
Code: Select all
ClipCursor( Confine=True, x1=0 , y1=0, x2=1, y2=1 ) {
VarSetCapacity(R,16,0), NumPut(x1,&R+0),NumPut(y1,&R+4),NumPut(x2,&R+8),NumPut(y2,&R+12)
Return Confine ? DllCall( "ClipCursor", UInt,&R ) : DllCall( "ClipCursor" )
}
Code: Select all
WinGetPos, VarX, VarY, Width, Height, A
VarX2 := VarX + Width - 15
VarY2 := VarY + Height - 15
ClipCursor( True, VarX, VarY, VarX2, VarY2)
The GUI I want to confine the mouse in looks like this:
So long story short, can I confine my mouse cursor to a circular shape?
Bit of a luxurious problem I know, but I cant let it go
Thanks in advance guys and have a nice day.