; This script shows how to use AutoIt to print multiple Tableau dashboard to PDF files based on a parameter ; all values of the parameter are copied to an Excel file, startig with cell A2. When Excel is first opened, ; the active cell is A1, which is blank ; The default printer has been set to PDF. The option "View PDF after printing" has been disabled #include Local $excelfile = "E:\AutoIT Scripts\Category.xlsx" ;this is the location and name of my excel file Local $oExcel_1 = _Excel_Open() Local $tableaufile = "E:\AutoIT Scripts\DemoForPOC" ;this is the location and name of my tableau file Local $repeattime = 3 for $i = 3 to $repeattime _Excel_BookOpen($oExcel_1, $excelfile); this opens the Excel file with the filter values Send("{DOWN}"); Send a down arrow, which moves cursor to cell A2 Send("^c");Copy value in cell A2. For all menu command, use lower case if upper case doesn't work sleep(1000) WinActivate($tableaufile); Activate Tableau - NOT WORKING FROM THIS POINT ONWORD... WinWaitActive($tableaufile); waiting for Tableau window to show up MouseClick("Left",848,120); click the parameter window Send("{BACKSPACE 3}"); delete existing content Sleep(1000); wait 1 second Send("^v"); paste in new code from the Excel file Send("{ENTER}"); Send enter key Do sleep(500) until WinExists("Computing visualization of ")= 0 ; wait until tableau finishes processing Send("^p"); print out current dashboard WinWaitActive("Print"); wait for print window to show up sleep(1000) Send("{ENTER}");send enter to select ADOBE PDF printer WinWaitActive("Save PDF File As"); wait for window to prompt for file name Send("^v"); send paremeter name as file name Send("{Enter}"); print sleep(3000); wait until ADOBE finishes printing Next msgbox(0,"Complete","Finished printing. Please verify the output and compile into one document using binder.")