#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.12.0 Author: Pierfrancesco Ghedini Script Function: HAck HP Prime Template AutoIt script. #ce ---------------------------------------------------------------------------- #include #include #include ; Create application object and open an example workbook Local $oAppl = _Excel_Open() If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example", "Error creating the Excel application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended) Local $oWorkbook = _Excel_BookOpen($oAppl, @ScriptDir & "\Values.xlsx") If @error Then MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example", "Error opening workbook '" & @ScriptDir & "Values.xlsx'." & @CRLF & "@error = " & @error & ", @extended = " & @extended) _Excel_Close($oAppl) Exit EndIf ; ***************************************************************************** ; Read data from a single cell on the active sheet of the specified workbook ; ***************************************************************************** Local $sResult = _Excel_RangeRead($oWorkbook, Default, "A1") If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example 1", "Error reading from workbook." & @CRLF & "@error = " & @error & ", @extended = " & @extended) ;MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example 1", "Data successfully read." & @CRLF & "Value of cell A1: " & $sResult) ; Close Excel _Excel_Close($oAppl) Run("C:\Program Files\Hewlett-Packard\HP Connectivity Kit\ConnectivityKit.exe") ;Run("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\HP Calculators\HP Connectivity Kit.lnk") WinWaitActive("HP Connectivity Kit") ; Open Calculator Tree Sleep(3000) MouseClick("primary", 25, 133, 1) Sleep(3000) ; Open Programs Tree MouseClick("primary", 44, 289, 1) Sleep(3000) ; Open Right Menu On Programs MouseClick("secondary", 102, 286, 1) Sleep(3000) ; Select New Option MouseClick("primary", 155, 300, 1) Sleep(3000) ; Insert the program name Send("ST_L{enter}") Sleep(3000) Send("{down}{down}L0:=") ; Send list in raw mode Send($sResult,1) Sleep(3000) ; Save program MouseClick("primary", 72, 73, 1)