qwert Posted September 21, 2008 Share Posted September 21, 2008 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) ExitWhen 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. Link to comment Share on other sites More sharing options...
James Posted September 21, 2008 Share Posted September 21, 2008 GUISetCursor() is only used when an AutoIt GUI is beneath your mouse. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
qwert Posted September 21, 2008 Author Share Posted September 21, 2008 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.) Link to comment Share on other sites More sharing options...
James Posted September 21, 2008 Share Posted September 21, 2008 There is a search function. I think Kip did it Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
qwert Posted September 22, 2008 Author Share Posted September 22, 2008 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. linkI 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. Link to comment Share on other sites More sharing options...
James Posted September 22, 2008 Share Posted September 22, 2008 It seems the only way of doing it. Kips UDF is pretty neat, I have used it before. Give it a shot, if it doesn't do what you want it to do then I shall try re-writing it for you. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now