#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.5 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here ; Run the Windows Calculator. #include Run("calc.exe") WinWaitActive("Calculator","") ; Wait for the calculator to become active with a timeout of 10 seconds. ;WinWaitActive("[CLASS:ApplicationFrameWindow]", "", 10) ; If the calculator did not appear after 10 seconds then exit the script. If WinExists("[CLASS:ApplicationFrameWindow]") = 0 Then Exit ; Now that the calculator window is active type the values 2 x 4 x 8 x 16 ; Use AutoItSetOption to slow down the typing speed so we can see it AutoItSetOption("SendKeyDelay", 400) Send("2*4*8*16=") Sleep(500) Send("^c") WinActivate("Calculator","") $result = ClipGet() ;MsgBox($MB_OK,"","result: "&$result) ConsoleWrite("result: "&$result) ; Slow the script down so we can see what's going on. Sleep(1000) ; Close the Windows calculator - always tidy up afterwards. WinClose("[CLASS:ApplicationFrameWindow]")