subbhci 0 Posted March 2, 2014 Hi All, i am new to AutoIt , I get stuck while tying to read Calculator result from the control in Windows 7 please help me with this thanks in advance, #include <MsgBoxConstants.au3> Run("calc.exe") WinWaitActive("Calculator") Local $hWnd = WinWait("[CLASS:CalcFrame]", "", 10) ControlClick("Calculator", "", "[iD:132]") ControlClick("Calculator", "", "[iD:132]") ControlClick("Calculator", "", "[iD:132]") $winHandle = WinGetHandle("class=#327701", "") $controlHandle = ControlGetHandle($winHandle, "#3277011", "") ;Local $sText = ControlGetText("Calculator", "", "#327701") Local $sText = ControlGetText($controlHandle, "", "#327701") MsgBox($MB_SYSTEMMODAL, "", "result :: " & $sText) here is more info from windows Info , i see visible text but not sure how this works >>>> Window <<<< Title: Calculator Class: CalcFrame Position: 1079, 288 Size: 228, 322 Style: 0x14CA0000 ExStyle: 0x00000100 Handle: 0x001108C0 >>>> Control <<<< Class: #32770 Instance: 1 ClassnameNN: #327701 Name: Advanced (Class): [CLASS:#32770; INSTANCE:1] ID: Text: Position: 11, 10 Size: 190, 50 ControlClick Coords: 106, 30 Style: 0x5000004C ExStyle: 0x00000080 Handle: 0x00130562 >>>> Mouse <<<< Position: 1204, 378 Cursor ID: 0 Color: 0xF6F9FD >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< 2255 >>>> Hidden Text <<<< thanks subbu Share this post Link to post Share on other sites
JohnOne 1,603 Posted March 2, 2014 Use code tags when posting code. Run("calc.exe") Local $hWnd = WinWaitActive("Calculator") ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:10]") ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:10]") ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:10]") $txt = WinGetText($hWnd) MsgBox(0, 0, $txt) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites