Sign in to follow this  
Followers 0

GUIGetCursorInfo bug?

7 posts in this topic

Posted

GUIGetCursorInfo does not return the correct primary/secondary down info in Windows 2000 if you switch primary/secondary mouse buttons via the Control Panel (for left handers).

It does return correct information however in Windows XP (at least on my XP machine it does).

I'm using AutoIt3 version 3.1.1.64.

Run this program to see...

#include <GUIConstants.au3>

GUICreate("Mouse Test", 400, 400)
$b=GUICtrlCreateLabel ("0", 10, 10,50)
$c=GUICtrlCreateLabel ("0", 10, 30,50)
$d=GUICtrlCreateLabel ("0", 10, 50,50)
$e=GUICtrlCreateLabel ("0", 10, 70,50)
$f=GUICtrlCreateLabel ("0", 10, 90,50)
$button = GUICtrlCreateButton("Button", 10, 110, 100, 20)
$primary = GUICtrlCreateLabel("Primary", 40, 180, 80, 20)
$secondary = GUICtrlCreateLabel("Secondary", 200, 180, 80, 20)
GUISetState()

; Run the GUI until the dialog is closed
While 1
	GetPos()
	$msg = GUIGetMsg()
	If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

Func GetPos()
	$a=GUIGetCursorInfo()
	GUIctrlSetData($b,$a[0]) 
	GUIctrlSetData($c,$a[1])
	GUICtrlSetData($d,$a[2])
	GUICtrlSetData($e,$a[3])
	GUICtrlSetData($f,$a[4])
	If $a[2] Then
		GUICtrlSetBkColor($primary,0xFF0000)
	Else
		GUICtrlSetBkColor($primary,0xF1F1EC)
	EndIf
	If $a[3] Then
		GUICtrlSetBkColor($secondary,0xFF0000)
	Else
		GUICtrlSetBkColor($secondary,0xF1F1EC)
	EndIf
EndFunc
roulette3832 likes this

Share this post


Link to post
Share on other sites



Posted

Yep, a bug.

I think it's a kind of misunderstanding in the function.

I will ask jpm for more info cause I found something through testing and googeling :)

Regards

Holger

Share this post


Link to post
Share on other sites

Posted

Is this bug really not solved? - in my opinion it is, so we should close this topic!?

Share this post


Link to post
Share on other sites

Posted

i say close it. if the bug still exist someone will just make a new topic :whistle:

Share this post


Link to post
Share on other sites

Posted

This bug appears to have been fixed. This topic can be closed.

-Livewire

Share this post


Link to post
Share on other sites

Posted

The bug already exists in AutoIt 3.2.10.0 and Windows XP (Sp2).

But only when the CheckBox "Switch primary and secondary buttons" in the Mouse Properties in Control Panel is checked.

Share this post


Link to post
Share on other sites

Posted

The bug already exists in AutoIt 3.2.10.0 and Windows XP (Sp2).

But only when the CheckBox "Switch primary and secondary buttons" in the Mouse Properties in Control Panel is checked.

Fixed in next beta. I have no idea why the code that fixed the original problem got removed...

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0