#include #include #include #include #include #include ;Local $File = Winactivate ("SFDC_ZIP.xlsx - Excel") ;Local $SFDC = WinWaitActive("Salesforce - Unlimited Edition") ; Launch and Login to SFDC SFDC() Sleep(8000) If WinActive("Salesforce - Unlimited Edition") Then WinSetState("Salesforce - Unlimited Edition","",@SW_MAXIMIZE) ;Send("{Tab 8}") ElseIf WinActive("Philips Access Management - Internet Explorer") Then ;WinWaitActive("Philips Access Management - Internet Explorer") ;Sleep(3000) Send("{Tab 8}") Sleep(3000) Send("{Tab}") Sleep(3000) Send("{Tab}") Send("{Enter}") WinWaitActive("Salesforce - Unlimited Edition") WinSetState("Salesforce - Unlimited Edition","",@SW_MAXIMIZE) Send("{Tab 8}") EndIf Local $oExcel = _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($oExcel, @ScriptDir & "\SFDC_ZIP.xlsx") If @error Then MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example", "Error opening workbook '" & @ScriptDir & "\SFDC_ZIP.xlsx'." & @CRLF & "@error = " & @error & ", @extended = " & @extended) _Excel_Close($oExcel) $aExcelData = _ExceL_RangeRead($oWorkbook, Default, Default, 1) For $iRow = 0 To UBound($aExcelData, 1) -1 For $iCol = 0 To UBound($aExcelData, 2) -1 ConsoleWrite($aExcelData[$iRow][$iCol] & @CRLF) Sleep (2000) MouseClick ("Left",406, 42, 1) ;Send ("URL") Sleep(2000) Send("^v") ; Paste Account ID Send("{ENTER}") Sleep(5000) Send ("{SHIFTDOWN}") Send ("{DOWN 6}") Send ("{SHIFTUP}") Sleep (1000) MouseClick ("Left", 704, 220,2) ;Selects Zip Code ;Send ("^c"); Coppies Zip Code Send("{Tab 13}") Send ("{Tab}") ; Selects Postal Code in Trilium Send("^v") ;Paste Zip Code in Trilium Send ("{SHIFTDOWN}") Send ("{Tab 3}") Send ("{SHIFTUP}") Send ("{ENTER}") ;Executes the AutoPopulate in Trilium MouseClickDrag ("Left", 570, 210, 768, 210) ; Select Address ;Send ("^c"); Coppies address Send("{Tab 17}") Send("^v");Paste the street in trilium MouseClick ("Left", 547, 210,2);Selects the address number ;Send ("^c"); Coppies the address number Send("{Tab 18}") Send("^v"); Paste the House Number in Trilium Send ("{Tab 4}") ;Highlights the box Copy to Home Address in trilium Send ("{SPACE}") ;Checks the box Copy to Home Address in trilium Send ("{Tab 3}") ;Highlights the box Copy to Shipping Address in trilium Send ("{SPACE}") ;Checks the box Copy to Shipping Address in trilium Sleep (1000) Send ("{Tab 3}") ;Highlights the Save button in trilium Send ("{ENTER}") ;Selects the save button in trilium Sleep (3000) ;$aExcelData [$iRow][$iCol] = ;"Row: " & $aExcelData & " - Col: " & $aExcelData Next Next Exit EndIf Func SFDC() ;_IECreate("https://philipsb2c.my.salesforce.com/home/home.jsp ", 0, 1, 1, 1) EndFunc ;==>SFDC