Modify ↓
Opened 17 years ago
Closed 17 years ago
#674 closed Bug (Fixed)
_GUICtrlTab_ClickTab() Clicks in the wrong place when $fMove = True
| Reported by: | Bowmore | Owned by: | Gary |
|---|---|---|---|
| Milestone: | 3.2.13.11 | Component: | Standard UDFs |
| Version: | 3.2.13.10 | Severity: | Blocking |
| Keywords: | Cc: |
Description
Enviroment:
Win XP Pro SP2
Autoit 3.2.12.1
Autoit 3.2.13.10 Beta
If the $fMove option is set to True the mouse is moved to the wrong location when the window is not maximised. In the code below I've added the 2 highlighted lines to temporarily change the "MouseCoordMode" move the curusor and then reset "MouseCoordMode" to what it was. I've tested this on a few different scenarios and it works OK for me.
Func _GUICtrlTab_ClickTab($hWnd, $iIndex, $sButton = "left", $fMove = False, $iClicks = 1, $iSpeed = 1)
Local $iX, $iY, $tPoint, $tRect, $iMode, $aPos
If $Debug_TAB Then _GUICtrlTab_ValidateClassName($hWnd)
If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)
$tRect = _GUICtrlTab_GetItemRectEx($hWnd, $iIndex)
$tPoint = _WinAPI_PointFromRect($tRect, True)
$tPoint = _WinAPI_ClientToScreen($hWnd, $tPoint)
_WinAPI_GetXYFromPoint($tPoint, $iX, $iY)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $iX = ' & $iX & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $iY = ' & $iY & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
If Not $fMove Then
$iMode = Opt("MouseCoordMode", 1)
$aPos = MouseGetPos()
Opt("MouseCoordMode", $iMode)
_WinAPI_ShowCursor(False)
MouseClick($sButton, $iX, $iY, $iClicks, $iSpeed)
MouseMove($aPos[0], $aPos[1], 0)
_WinAPI_ShowCursor(True)
Else
$iMode = Opt("MouseCoordMode", 1) ;;ADDED THIS LINE
MouseClick($sButton, $iX, $iY, $iClicks, $iSpeed)
Opt("MouseCoordMode", $iMode) ;;ADDED THIS LINE
EndIf
EndFunc ;==>_GUICtrlTab_ClickTab
Attachments (0)
Change History (4)
comment:1 by , 17 years ago
| Severity: | None → Blocking |
|---|
comment:2 by , 17 years ago
| Severity: | Blocking → None |
|---|
comment:3 by , 17 years ago
| Severity: | None → Blocking |
|---|---|
| Status: | new → assigned |
comment:4 by , 17 years ago
| Milestone: | → 3.2.13.11 |
|---|---|
| Resolution: | → Fixed |
| Status: | assigned → closed |
Fixed in version: 3.2.13.11
Note:
See TracTickets
for help on using tickets.

Automatic ticket cleanup.