Modify

Opened 17 years ago

Closed 17 years ago

#634 closed Bug (No Bug)

Increased activtity on mouse move

Reported by: scottrade@… Owned by:
Milestone: Component: AutoIt
Version: 3.2.12.0 Severity: None
Keywords: Cc:

Description

There is a increased activity when you move your mouse. The mouse doesn't have to be over the window.

$GUI = GUICreate("The Matrix", 640, 480, -1, -1)
GUISetCursor(16, 1, $GUI)
GUISetBkColor(0x000000)
GUICtrlSetDefColor(0x008000, $GUI)
GUISetFont(9, 500, 0, "Courier New",$GUI)
Global $Char[1568]
$Num = 0
For $a = 0 To 48
	For $b = 0 To 31
		$Char[$Num] = GUICtrlCreateLabel("", $a * 13, $b * 15, 13, 15, 1)
		$Num = $Num + 1
	Next
Next
GUISetState(@SW_SHOW)
While 1
	GUICtrlSetData($Char[Random(0, 1568)], Chr(Random(32, 255)))
	If GUIGetMsg() = -3 Then Exit
WEnd

Attachments (0)

Change History (1)

comment:1 by Valik, 17 years ago

Resolution: No Bug
Status: newclosed

When the mouse is moved (and the GUI is active) the $GUI_EVENT_MOUSEMOVE message is posted. Every time a message is received you update the GUI with GUICtrlSetData(). Since moving the mouse generates a lot of messages you end up calling GUICtrlSetData() a lot which burns up a lot of CPU cycles.

This is not a bug in AutoIt.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.