Automating Adobe InDesign CC 2015

Seasons Greetings

Sunday, December 11, 2016

In keeping with the season, may we offer a fun little AppleScript script as a bonus that may leave you smiling.

Just copy the script into the AppleScript Editor and save it as an .app file on your hard drive (without options checked).

When you want to run it, make sure you have sound turned on and double-click the icon for the file.

Twelve Days of Christmas

set theCounters to {"First", "Second", "Third", "Fourth", "Fifth", "Sixth", "Seventh", "Eighth", "Ninth", "Tenth", "Eleventh", "Twelfth"}
set theCounted to {"a partridge in a pear tree.", "two turtle doves, and ", "three French hens, ", "four calling birds, ", "five golden rings, ", "six geese a-laying, ", "seven swans a-swimming, ", "eight maids a-milking, ", "nine ladies dancing, ", "ten lords a-leaping, ", "eleven pipers piping, ", "twelve drummers drumming, "}
set theseThings to {}
set countedSoFar to ""
repeat with n from 1 to 12
	set countedSoFar to item n of theCounted & countedSoFar
	set thisThing to "On the " & item n of theCounters & " Day of Christmas, my true love sent to me: " & countedSoFar
	set end of theseThings to thisThing
	say thisThing using "Victoria" with waiting until completion
end repeat

Notice how the repeat loop parses through the two lists (theCounters and theCounted), adding theCounted to countedSoFar to create the string (thisThing).

The say command is part of the User Interaction suite for Standard Additions. Take a look at the say command to see how you can change how the script is spoken. Notice that you can save the output to an AIFF file.

Have fun and enjoy the season.


I can't remember who first sent me this script, but it has been one that I have enjoyed playing with over the years.

Trackback Link
Post has no trackbacks.

Recent Posts


file paths try/on error AppleScript Templates AppleScript dialogs GPS metadata dropdowns Publish Online paragraph styles pasteboard Apple apps Mail CALS tables with timeout Glossary Interactive Publications ePub for iPad selection Bullets Library Folder Find by Font resize Read text file as list Metadata Placing images HTML Export Document stylesheets Find by Color records watermark parent resolve entire path Checkbox Control Custom Dialog text item delimiters Index of blogs and scripts for year 2016 Excel reframe transform Numbering images Character Styles PDF security Create Document repeat loops arrays parent page Table cells text placement scripting Choose file cut and paste Styling Text Editbox XML structure Repeat With Script Preferences External Object Scripts Templates Find Change page items Export to PDF active spread trimText Tables lists Export HTML PDF export preferences say import XML Create Text Frame GPS table styles XML stylesheets functions Video Change Text Custom Buttons metacharacters Document from Template fit Combobox Radiobutton Group InDesign template massage text path tutorial Image Placement wild cards transformation matrix AppleScript text editbox Text Cleanup automation Caption Variable measurements integer editboxes save template styles XML tags import text InDesign CC find change options folder Adding Captions new document text concatenation automated workflow BrdgeTalk PDF if/then Media Find by Attribute handlers Adobe InDesign CC Hyperlinks CSS Custom CSS Style Sheets Nested Styles do script Sound directory user interaction level automating InDesign ePub for Kindle Autoflow Choose from list coordinates script templates script folder object styles Border Panel Embed Document import HTML System Events transform again Find Text Preferences Automating animations InDesign dialogs enable redraw doScript Document Presets Enabling Groups Fixed Layout ePub Fixed Format ePub measurement editboxes placeable image metadata