Modify ↓
Opened 16 years ago
Closed 16 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 Changed 16 years ago by Valik
- Severity changed from None to Blocking
comment:2 Changed 16 years ago by TicketCleanup
- Severity changed from Blocking to None
comment:3 Changed 16 years ago by Valik
- Severity changed from None to Blocking
- Status changed from new to assigned
comment:4 Changed 16 years ago by Gary
- Milestone set to 3.2.13.11
- Resolution set to Fixed
- Status changed from assigned to closed
Fixed in version: 3.2.13.11
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.
Note: See
TracTickets for help on using
tickets.
Automatic ticket cleanup.