Change Case uses OS X Services to expand TextEdit

I use TextEdit for writing my TUAW posts, and it's always running. Recently, I found a neat service that works wonders for TextEdit and (I'm sure) a bunch of other text editors. It's free for the downloading from Ron Fleckner in Melbourne, Australia. What you'll get is a ZIP file that expands into a little, 86KB application file called Change Case.
Once installed, select some words or sentences, go to Services, and you'll get a screen like the one above. It's pretty self explanatory; ALL CAPS, All lowercase, and Toggle Case do just what they say. Word Capitals capitalizes each word in a sentence, and camelCase (which you might know as InterCap) is mostly used for brand names. It turns something like " My Program" into "MyProgram." While it's true that a few of these options are available in TextEdit under the Edit-> Transformations menu (namely: Make Upper Case, Make Lower Case and Capitalize), the Services menu is easier to get to, and Change Case does more.
I had a bit of trouble with it, which was probably all my fault. I've been emailing Ron, who has given me a great deal of insight as to what's happening. The first thing that may be a bit confusing is Ron's graphic, which looks like this:

The hierarchical menu that's shown only appears if you are running OS X 10.5 (Leopard). Apple did away with this useful feature in OS X 10.6, so Snow Leopard users will see the first picture in this post. Some other things were also broken. Under Snow Leopard, you won't find the old "New TextEdit Window Containing Selection" or "Open Selected File in TextEdit." That's in spite of the fact that TextEdit's info.plist file, where applications advertise Services to the Finder and System, have the correct entries (go figure).
Ron's page says to install the Change Case app in the root /System/Library folder, but as it turns out, that really isn't necessary. Finder will look for Services files anywhere. It is a good idea to follow his advice, though, if only to keep your Services in one place and make it easier to find. When you move it, you might get the usual 'type in your password" screen, or sometimes this comes up:


I had some trouble getting it to work on my MacBook Pro, but following these instructions worked perfectly on my iMac, so I'm pretty sure that the screw-ups were all mine. Just in case they weren't, though, here's what happened on the MacBook Pro (and how I solved the problems). The first time that I moved the file to the root /System/Library folder and logged out and back in, I found the entire folder to be empty. All the Services were gone. This was easily solved by copying the contents of the folder from my iMac onto a flash drive and copying it back to the MacBook Pro. Just to be on the safe side, you might want to copy the folder to your desktop and archive it into a ZIP file, which will give you easy recourse if this happens to you.
I deleted Change Case but didn't empty the trash, so there was at least one extra copy of it (and maybe more, since I went through installation a few times) still on my system. After logging out and back in, I went to the Services menu, which simply said "Building." I waited for a little while, and nothing ever showed up as Services (in any program). According to Ron, this was probably caused by the fact that I had more than one copy of Change Case on the MacBook Pro; the multiple copies were confusing the Finder. So, I found every instance of Change Case, made sure they were deleted, and I emptied the trash. Next, I downloaded a fresh copy of Change Case, unzipped it, moved it to the /System/Library folder, logged out and back in, enabled it via the Keyboard Preference Pane, and it worked like a champ.
Again, this probably won't happen to you. Change Case is only a few lines of code, and according to Ron, it doesn't mess with anything important in the System or Finder, but it's better to be safe than sorry.
Those familiar with Xcode or AppleScript will probably find it useful to roll their own services. If you do, Ron recommends leaving the new Services in the place where Xcode puts them, which is in a folder called "build" (in the projects folder). That way, any new version will overwrite the old one, and you won't have to worry about removing it.
[via creativebits]
Share
Categories
Mac OS X Services have been around for a while, but not many people use them. Under the title of any Cocoa program in the upper left of...
Add a Comment
If you open textedit, click edit go to transformation, this functionality is already built in.
it works for mail too.
What I would like is a smart capitalization routine. One that capitalizes like the Word Capitals but ignores: the, an, a of, etc. except at the beginning of the sentence.
Example: The Apples are Full of Good Vitamins.
Why hasn't anyone done this yet? It would save a lot of time...
there's ninety million takes on Title case scripts, here's a good place to start: http://daringfireball.net/2008/05/title_case
Thanks for the info... I messed around with it, but could not get it to work under Snow Leopard, but you helped me find textsoap, which does smart capitalization and allows you to build exception lists. it is pretty nice! thanks again for the help...
August 15 2010 at 1:50 AM Report abuse Permalink rate up rate down ReplyWhen using TextEdit, 3 of these are incorporated in Edit > Transformation menu: Make Uppercase, Make LowerCase, Capitalize.
@ilkyone thank you for the info on Devon's WordService
Trust me on this: ALL CAPS is not needed...
August 13 2010 at 2:20 PM Report abuse Permalink rate up rate down ReplyI also recommend what ilkyone says about DevonThink's service items, some of which are in my QK toolbars mentioned in my last comment.
I also should have said, for those not familiar with Quickeys, that once the toolbars are set up, all you need to do to use a service is click its toolbar entry.
Services can be a real problem because there are so many of them available and they're hidden away so that I forget about them.
I fixed this using Quickeys X 4.0, which is one of my all-time favourite Mac utilities dating back at least 20 years. It's simple to do. Create a Quickeys menu shortcut for each Services item you think you'll want to use. Create one or more Quickeys toolbars and drag the shortcuts in their Toolbars. (I like to use separate toolbars for each application). Now I can't forget about the service items, as they're on-screen staring me in the face all day as I work.
similar to brian, I'm not trying to start a war here, either, but my services menu is heavily used, and the ones getting the most usage are from DEVONtechnologies and Bean (free).
Both offer word wrangling services for free.
DEVONtech's Word Services 2.7 is free here: http://www.devon-technologies.com/products/freeware/services.html and it does the bulk of heavy lifting, even including a statistics service that allows you to get a word count anywhere you are typing text, whether email, web form, etc...
all 34 services are:
Reformat, Remove line attachments/endings/links/multiple spaces/multiple feeds/quotes, Trim line beginnings/line endings/lines, Sort lines ascending/descending, Shift left/right, Initial caps of words/sentences, All caps and lowercase, Mac/Windows/Unix line endings, Rotate 13, Straight/Smart Quotes, Encode/Decode tabs, Insert date/date and time/time/contents of path, Speak native/German text, Statistics.
check out the other freebies they give, too, including an RTF2PDF converter. These services and a bunch more are part of the DEVON suite, but they give these bits for free.
Not trying to start an editor war here, just wanted to point out that TextWrangler (free) and BBEdit (not) have "Change case" in the "Text" menu. Options are: all upper case, all lower case, capitalize words, capitalize sentences, and capitalize lines.
August 13 2010 at 10:14 AM Report abuse Permalink rate up rate down ReplyAnd there's nothing in these services you couldn't do with a simple find and replace in TextWrangler if you turn on regular expressions.
August 13 2010 at 8:11 PM Report abuse Permalink rate up rate down ReplyThanks for the creativebits.org link!
August 13 2010 at 9:34 AM Report abuse Permalink rate up rate down ReplyHot Apps on TUAW
Deals of the Day
more deals- Verizon Leather Sleeve for Tablets for $4 + free shipping
- Wicked Jaw Breaker Noise-Isolating In-Ear Headphones for $6 + free shipping
- Refurb Apple MacBook Air Laptops: 12" 64GB SSD for $699 + free shipping
- JVC Motion Sensing Clock Radio with Dual iPod Docks for $55 + free shipping
- Apple iPhone Headset with Mic for $4 + $2 s&h
- Refurb Apple iPod nano 8GB MP3 Player for $99 + free shipping, 16GB for $119
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



12 Comments