Re: Changing CAPITAL to Upper And Lower Case
Re: Changing CAPITAL to Upper And Lower Case
- Subject: Re: Changing CAPITAL to Upper And Lower Case
- From: Christopher Nebel <email@hidden>
- Date: Fri, 12 Jan 2007 15:41:49 -0800
On Jan 12, 2007, at 1:30 PM, Andrew Oliver wrote:
On Jan 12, 2007, at 12:50 PM, Ripka, Herb wrote:
We have a book where the titles are all CAPITAL letters (and in
style sheet "One").
Is there a way in AppleScript where the titles (in style sheet
"One") can be changed to Upper And Lower Case instead?
Care to share the application your book is written in?
Since AppleScript drives the application the solution is going to
vary greatly depending on the app in question.
That is, the process of getting and setting the titles is going to
vary greatly. For instance, are the titles easily fetchable
properties, or do you have to analyze the text to figure out where
they are? The process of turning a string into title case (yes,
that's the technical term) the text is probably going to be
independent of the application, however, unless your application
happens to have a command to do it.
While AppleScript can ignore or consider case when comparing text, it
doesn't have any built-in mechanism for changing case. If you're
willing to use AppleScript Studio, then you can use Cocoa's
"capitalizedString" method; otherwise you're going to need to do it
yourself. This isn't particularly hard if you're willing to limit
yourself to the 26 unaccented Roman letters.
Bear in mind that strict title case -- capitalizing every word -- may
not be what you want. Editorial guidelines on this sort of thing
differ.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden