Jump to content

hsteeman

Members
  • Posts

    3
  • Joined

  • Last visited

Community Answers

  1. hsteeman's post in Automated testing was marked as the answer   
    Thank you very much. The problem is solved now.
    I use WinSpy++ to get the controlID. It displays a controlID with value 00000096, which is hexadecimal. The decimal value is 150.
    I display the correct value via:
    #include <MsgBoxConstants.au3> #region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00020409) --- #region --- Internal functions Au3Recorder Start --- Func _Au3RecordSetup() Opt('WinWaitDelay',100) Opt('WinDetectHiddenText',1) Opt('MouseCoordMode',0) Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '') If $aResult[1] <> '00020409' Then MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00020409->' & $aResult[1] & ')') EndIf EndFunc Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc _AU3RecordSetup() #endregion --- Internal functions Au3Recorder End --- _WinWaitActivate("AutoIT","") Send("{LWINDOWN}{LWINUP}") _WinWaitActivate("Menu Start","") Send("calc.exe{ENTER}") _WinWaitActivate("Rekenmachine","") Send("2*3{ENTER}") #endregion --- Au3Recorder generated code End --- ; Display result of calc Local $result_calc = ControlGetText("Rekenmachine","",dec("96")) MsgBox($MB_SYSTEMMODAL, "", "The result of calc is: " & $result_calc) WinClose("Rekenmachine")
×
×
  • Create New...