Jump to content

MouseGetCursor wrong help description?


Recommended Posts

Maybe a bug or a problem on the description, but...

 

#include <MsgBoxConstants.au3>

Sleep(3000) ; Allow time for the cursor to change its state.

; Create an array of possible cursor states using StringSplit.
Local $aArray = StringSplit("Hand|AppStarting|Arrow|Cross|Help|IBeam|Icon (obsolete)|No|" & _
        "Size (obsolete)|SizeAll|SizeNESW|SizeNS|SizeNWSE|SizeWE|UpArrow|Wait|Empty", "|", 2) ; The flag parameter is set to flag = 2 as we don't require the total count of the array.
#cs
    The array returned will contain the following values:
    $aArray[0] = "Hand"
    $aArray[1] = "AppStarting"
    $aArray[2] = "Arrow"
    ...
    $aArray[16] = "Empty"
#ce

Local $iCursor = MouseGetCursor()
MsgBox($MB_SYSTEMMODAL, "CursorID = " & $iCursor, "Which means " & $aArray[$iCursor] & ".") ; Use the CursorID value as the index value of the array

This code is the same from the MouseGerCursor help example, only I changed the sleep time (in order to allow proper time to sit the cursor to test.

When I sit it over a hyperlink (which shows me a hand) it returns "16" to me, when should be returning "0", according to the help file.

I didn't find something this specific in the forum history, only this https://www.autoitscript.com/forum/topic/173218-solved-guisetcursor/#comment-1253063 which doesn't say much.

Tested on Win7, 8 and 10. Same thing.

Help file link: https://www.autoitscript.com/autoit3/docs/functions/MouseGetCursor.htm 

Forgive the small fish - I - in case he is missing something obvious.

Link to post
Share on other sites

Forget the bugs and other problems.

You have made a typing mistake in line 7 (better check again the help file).

 Nope, better check again what I wrote, and the help file :)

 

This code is the same from the MouseGerCursor help example

This is what's written in the example. Even if you don't change a single letter, the behavior is the same.

So, I still think it's wether a bug or most probably an error in the help file.

 

 

Link to post
Share on other sites
  • Moderators

Davidlago,

The current Help file MouseGetCursor return list does not match the one posted in the earlier thread to which you linked - that list seems to reflect what you are actually seeing. I will ask the person who changed the list to explain why they made the change.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites
  • Moderators

DavidLago,

I am unsurprised that the on-line Help and the Help file are identical - the build scripts ensure that is the case!

I was referring to the list posted in the thread to which you linked - it reads:

0 = UNKNOWN (this includes pointing and grabbing hand icons)
1 = APPSTARTING
2 = ARROW
3 = CROSS
4 = HELP
5 = IBEAM
6 = ICON
7 = NO
8 = SIZE
9 = SIZEALL
10 = SIZENESW
11 = SIZENS
12 = SIZENWSE
13 = SIZEWE
14 = UPARROW
15 = WAIT
16 = HAND

which is what SVN tells me was indeed the case in the Help file before the change to which I referred above. Let us now wait to see what the person who changed the list has to say.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites
  • Moderators

David Lago,

It appears there has been a disconnect between the Help file and the code when 3.3.14.2 was released. The current Help file page refers to the Beta 3.3.15.0 version of that function - the release version still gives the old returns as shown in the list I posted immediately above. Sorry about that - producing an updated release version when changes have already been made to the SVN for the next Beta is always a bit tricky.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites
  • 3 weeks later...

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...