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.

Credits

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
http://www.yourscriptdoctor.com/BlogRetrieve.aspx?BlogID=18153&PostID=1484762&A=Trackback
Trackbacks
Post has no trackbacks.

Recent Posts


Tags

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

Archive