• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Thirteen Scripters Scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Thirteen Scripters Scripting


  • Subject: Thirteen Scripters Scripting
  • From: David Marshall <email@hidden>
  • Date: Wed, 24 Dec 2008 18:04:32 -0500

Hi all,

Those of you running an earlier version of OS X than 10.5 will need to substitute another System Voice for "Alex" in the script's last line (choices are found in System Preferences -> Speech -> Text to Speech).

A judicious application of command-period will bring relief, once your irritation threshold has been crossed. As always, watch out for line wraps!

- - - - -

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
end repeat
set AppleScript's text item delimiters to " "
set theseThings to (theseThings as text)
set AppleScript's text item delimiters to ""
do shell script "say -v Alex " & theseThings


- - - - -

Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Thirteen Scripters Scripting
      • From: "Mark J. Reed" <email@hidden>
    • Re: Thirteen Scripters Scripting
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: Using Applescript to Sync and Mount drives etc.
  • Next by Date: Re: Thirteen Scripters Scripting
  • Previous by thread: Re: Using Applescript to Sync and Mount drives etc.
  • Next by thread: Re: Thirteen Scripters Scripting
  • Index(es):
    • Date
    • Thread