; 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, from cell A2 to A10. Active cell is A1, which is blank ; The default printer has been set to PDF. The option "View PDF after printing" has been disabled Local $parameterfile = "Microsoft Excel - divisionlist" Local $tableaufile = "Tableau - 150516 DWU Exp Dashboard for Video" Local $repeattime = 5 for $i = 1 to $repeattime WinActivate($parameterfile); this activates the excel file (you need to change file name here) 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 (you need to change file name here) WinWaitActive($tableaufile); waiting for Tableau window to show up MouseClick("Left",225,342); click the parameter window (you need to change mouse cursor location) 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 airport name as file name Send("{Enter}"); print sleep(3000); wait until ADOBE finishes printing Next msgbox(0,"Done","We are done!")