Related to my guide regarding on using GREP styles to change words to small caps, I recently wrote this small script to let you really change case in a search.
The dialog box that opens when activating the script.

Activating the script lets you type in a search string, which also accepts GREP, and selecting which of the four cases you want the text transformed to, UPPERCASE, lowercase, Title Case or Sentence case. The script also lets you search a single story or a whole document.
The end result.

The script
The JavaScript can be downloaded here: search_change_case.jsx.
You can add it to your Scripts palette and run it from there. To do that, place the file inside the "~/Library/Preferences/Adobe InDesign/Version 6.0/Scripts/Scripts Panel" folder.
Note that depending on the length of your document, the script might take a while to run.
Changelog
1.5: Added options for applying a character style or local small caps formatting for the found text.
Comments
Nadya Miloserdova wrote:
Thank you!
Wonderful script indeed. In even works in Russian!
???????!
Silkjaer wrote:
No problem - glad you like it!
Nadya Miloserdova wrote:
Thanks again. I surely like it even more now!
Idea: you could possibly include Paragraph Style or Charactes Style Attributes to specify the text to be found.
Now I have to make a preliminary Find/Change and introduce some temporary marks to show where the particular grep pattern is to be searched for. After the script does its work I remove my marks.
Silkjaer wrote:
I will note it and probably add it in an update at some point :)
František Horálek wrote:
Great! Thank you very much.
Deepak Sharma wrote:
Its working in Version 5.0 because when i copy the script text and runs its shows error and if anyone has this script is in .jsx format please send me at manu_deepak1980@yahoo.com
Thanks
Write a comment!