Sign in to follow this  
Followers 0
qwert

Cursor confusion

6 posts in this topic

This is my first attempt at controlling the cursor in an external application, so I expect that I'm missing something very basic. This is a test script I have been trying:

$Cursor = MouseGetCursor(); save cursor
Sleep(1000)
MsgBox(32, "Start", "Mouse style was " & $Cursor, 2)

GUISetCursor(3,1) ; change to Cross
Sleep(1000)

$Check = MouseGetCursor(); check cursor
MsgBox(32, "Middle", "Mouse style is " & $Check, 2)

GUISetCursor($Cursor,1) ; change to original
MsgBox(32, "End", "Mouse style restored to " & $Cursor, 2)
Exit

When I run it using SciTE as the external application, it can detect the cursor type=2 when I position it at the top of the screen ... and type=5 when I move it down into the script edit area. But the GUISetCursor never works. The Middle check always finds the cursor type the same as at the Start. I've read a few cursor threads, but I haven't found one addressing this very basic case.

Any help will be appreciated.

Thanks.

Share this post


Link to post
Share on other sites



GUISetCursor() is only used when an AutoIt GUI is beneath your mouse.

Oh. Then what approach should I consider for an external application?

(Thanks for your response.)

Share this post


Link to post
Share on other sites

There is a search function. I think Kip did it :)

Is this the one?:

_WinAPI_RegisterClassEx() ... Create you own class. Drop shadow, change window icon/cursor. link

I don't follow why something so drastic is needed. I only need to change to one of the 16 standard cursors. Can anyone explain? ... or provide a couple of search terms. I believe I've already read everything with "cursor" in the title.

Thanks for the response.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0