Opened 12 years ago
Last modified 12 years ago
#2208 closed Feature Request
ControlGetText not working on calculator — at Version 2
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | Severity: | None | |
Keywords: | Cc: |
Description (last modified by Valik)
Win7 64 bits mode (and 32 bits mode)
Unable to get text of (static) control. Reproduced with below code on calculator.
I believe this is due to changed behaviour of WM_GETTEXT in Win Vista/7 (and as such probably not a bug) but for standardcontrols would be nice if there is a workaround to get for example the text labels of the calculator buttons.
Also AU3Info x64 and x86 hoovering over the buttons give no text value and spy++ neither.
;Calculator, make sure its started ;$calcHWND = WinGetHandle("[CLASS:SciCalc]") $calcHWND = WinGetHandle("[REGEXPCLASS:.*Calc.*]") if $calchwnd = "" Then run("calc.exe") sleep(2000) ; $calcHWND = WinGetHandle("[CLASS:SciCalc]") $calcHWND = WinGetHandle("[REGEXPCLASS:.*Calc.*]") EndIf winactivate($calcHWND) Local $hHandle = ControlGetHandle("", "", "[CLASS:Button; INSTANCE:8]") Local $aPos = ControlGetPos("", "", $hHandle) local $cText= controlgettext("","",$hHandle) Local $wText = wingettext($hHandle) Consolewrite("Window Stats:" & "Position: " & $aPos[0] & "," & $aPos[1] & @CRLF & "Size: " & $aPos[2] & "," & $aPos[3] & @CRLF) ConsoleWrite("text:" & $cText & @crlf) consolewrite("text2:" & $wText & @crlf)
Change History (2)
comment:1 Changed 12 years ago by TicketCleanup
- Version 3.3.8.1 deleted
comment:2 Changed 12 years ago by Valik
- Description modified (diff)
Note: See
TracTickets for help on using
tickets.
Automatic ticket cleanup.