-- PageMaker 6.5 and higher script -- Applies proper Title Case to selected text using font character attributes. -- Does *not* capitalize prepositions, articles, and conjunctions, -- except at the beginning of the title. -- Selection must begin right at first letter of title. -- Capitalization results visible only in Layout view, not in Story view. -- Author: Gordon Woolf -- Enhancements: Jonathan G. Bressel (bressel@sefer.org) -- This software is made available on an "AS IS" basis. THE AUTHORS MAKE -- NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF -- EXAMPLE, BUT NOT LIMITATION, THE AUTHORS MAKE NO AND DISCLAIM ANY -- REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY -- PARTICULAR PURPOSE. -- THE AUTHORS SHALL NOT BE LIABLE FOR ANY INCIDENTAL, SPECIAL, OR -- CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, -- OR OTHERWISE USING THIS SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF -- ADVISED OF THE POSSIBILITY THEREOF. --On 18 Feb 2003 at 8:39, Michael Brady wrote: --> This is for all software developers: --> --> Design (engineer) a *smart* change case command for Title Case, one --> that does *not* capitalize prepositions, articles, and conjunctions --> except at the beginning of the title. --No software needed. Just a script in PageMaker. Make sure there is a --quote mark at the end of the list of things not to be capped. Cut and --paste the following into a new script box in the script palette and --save it as something like "smartcase" (that's a 'c' in there!) --I think the list of words may fail at around 30 entries. --This script was enhanced by Jonathan G. Bressel (bressel@sefer.org) --20 Feb 2003 as follows: -- --1. The list of words will now not fail so soon, since the -- script engine does not have to read a long list. --2. The first word is now capitalized always. The beginning of the -- selection must be exactly at the beginning of the first word. -- The script could be enhanced to deal intelligently with -- deviant selections, but it's a bit more work than I feel like -- doing right now. --3. Script works with font attributes, assuming that all letters -- are always true lowercase. As a consequence, bad things will happen -- if there are actual uppercase letters in the title. To avoid -- trouble, the script now first forces all characters to true -- lowercase. Formatting is still preserved. --4. Added some more words to the lowlist word list. Add and remove -- as desired. var lowlist set lowlist, "a" >> lowlist set lowlist, "about" >> lowlist set lowlist, "above" >> lowlist set lowlist, "according" >> lowlist set lowlist, "across" >> lowlist set lowlist, "after" >> lowlist set lowlist, "against" >> lowlist set lowlist, "along" >> lowlist set lowlist, "amid" >> lowlist set lowlist, "among" >> lowlist set lowlist, "an" >> lowlist set lowlist, "and" >> lowlist set lowlist, "around" >> lowlist set lowlist, "as" >> lowlist set lowlist, "at" >> lowlist set lowlist, "athwart" >> lowlist set lowlist, "be" >> lowlist set lowlist, "before" >> lowlist set lowlist, "behind" >> lowlist set lowlist, "below" >> lowlist set lowlist, "beneath" >> lowlist set lowlist, "beside" >> lowlist set lowlist, "between" >> lowlist set lowlist, "beyond" >> lowlist set lowlist, "but" >> lowlist set lowlist, "by" >> lowlist set lowlist, "concerning" >> lowlist set lowlist, "during" >> lowlist set lowlist, "either" >> lowlist set lowlist, "except" >> lowlist set lowlist, "excepting" >> lowlist set lowlist, "for" >> lowlist set lowlist, "from" >> lowlist set lowlist, "in" >> lowlist set lowlist, "inside" >> lowlist set lowlist, "into" >> lowlist set lowlist, "is" >> lowlist set lowlist, "it" >> lowlist set lowlist, "like" >> lowlist set lowlist, "neither" >> lowlist set lowlist, "nor" >> lowlist set lowlist, "of" >> lowlist set lowlist, "off" >> lowlist set lowlist, "on" >> lowlist set lowlist, "only" >> lowlist set lowlist, "onto" >> lowlist set lowlist, "or" >> lowlist set lowlist, "out" >> lowlist set lowlist, "outside" >> lowlist set lowlist, "over" >> lowlist set lowlist, "past" >> lowlist set lowlist, "pending" >> lowlist set lowlist, "regarding" >> lowlist set lowlist, "respecting" >> lowlist set lowlist, "round" >> lowlist set lowlist, "since" >> lowlist set lowlist, "that" >> lowlist set lowlist, "the" >> lowlist set lowlist, "then" >> lowlist set lowlist, "this" >> lowlist set lowlist, "though" >> lowlist set lowlist, "through" >> lowlist set lowlist, "throughout" >> lowlist set lowlist, "till" >> lowlist set lowlist, "to" >> lowlist set lowlist, "toward" >> lowlist set lowlist, "under" >> lowlist set lowlist, "underneath" >> lowlist set lowlist, "until" >> lowlist set lowlist, "unto" >> lowlist set lowlist, "up" >> lowlist set lowlist, "upon" >> lowlist set lowlist, "when" >> lowlist set lowlist, "where" >> lowlist set lowlist, "whether" >> lowlist set lowlist, "which" >> lowlist set lowlist, "who" >> lowlist set lowlist, "whose" >> lowlist set lowlist, "with" >> lowlist set lowlist, "within" >> lowlist set lowlist, "without" >> lowlist set lowlist, "yet" >> lowlist GetTextCursor >> mytextID, mybegin, myend GetStoryText 0,0 >> myText -- Force all text to true lowercase. -- Must do this char by char to maintain formatting. SetTextCursor mytextID, mybegin, mybegin max = myend - mybegin loop i = 1, max TextSelect +char myChar = substr(myText, i, 1) TextEnter tolower(myChar) endloop myText = myText/" " x = len(myText) loop y = 1,x thisword = myText(y) if thisword # lowlist > 0 cap = 0 else cap = 1 endif SetTextCursor mytextID, mybegin, mybegin if y > 1 TextCursor +word, (y-1) else cap = 1 endif TextSelect +char Case cap endloop SetTextCursor mytextID, mybegin, myend return --Anyone like to rewrite it in Applescript or VB for InDesign?