Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#254 closed Bug (Fixed)

GUIGetCursorInfo does not return the correct primary/secondary down info

Reported by: paulpmeier Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


Hello Jon,

i have no permission to reopen a fixed bug report, so i open a new.

I runned this script with AutoIt
The mouse buttons are swapped in the control panel.

If only one button is pressed down GUIGetCursorInfo() returns 1 for BOTH buttons.

Dim $CursorInfo[5]
$MouseButtonsSwapped = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")

$hWnd = GUICreate("Press a mouse button", 320, 90)
$hLblSwapped = GUICtrlCreateLabel("Mouse buttons swapped: " & $MouseButtonsSwapped, 10, 10, 200, 20)
$hLblPrimary = GUICtrlCreateLabel("Primary down: ", 10, 40, 200, 20)
$hLblSecundary = GUICtrlCreateLabel("Secondary down: ", 10, 60, 200, 20)

While GUIGetMsg() <> -3
	$MouseButtonsSwapped = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")
	GUICtrlSetData($hLblSwapped, "Mouse buttons swapped: " & $MouseButtonsSwapped)
	$CursorInfo = GUIGetCursorInfo($hWnd)
	GUICtrlSetData($hLblPrimary, "Primary down: " & $CursorInfo[2])
	GUICtrlSetData($hLblSecundary, "Secondary down: " & $CursorInfo[3])

What do i wrong?


Attachments (0)

Change History (3)

comment:1 Changed 16 years ago by Jon

  • Milestone set to
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in version:

comment:2 Changed 16 years ago by Jon

Fixed in next release candidate, hopefully.

comment:3 Changed 15 years ago by Valik

  • Milestone changed from to

Fixing wrong milestone.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jon.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.