-
1. Re: find uppercase - change in lower
Johnwhite Jul 23, 2014 5:18 AM (in response to premio_oscar)HI,
Take a look of this link:
the script made by Chinna
may be you can find what you want
John
-
2. Re: find uppercase - change in lower
Johnwhite Jul 23, 2014 5:19 AM (in response to Johnwhite)if the script is what you want
can you give Chinna a correct,
don't give me, please
john
-
3. Re: find uppercase - change in lower
vandy88 Jul 23, 2014 5:36 AM (in response to premio_oscar)Hope this will help you...
var array = ["MARC TWAIN", "ORSON WELLES"];
for(var j=0; j<array.length; j++)
{
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = array[j];
finds = app.documents[0].findGrep();
for(var i=0;i<finds.length;i++){
finds[i].texts[0].changecase(ChangecaseMode.titlecase);
}
app.findGrepPreferences = app.changeGrepPreferences = null;
}
Vandy
-
4. Re: find uppercase - change in lower
premio_oscar Jul 23, 2014 5:43 AM (in response to Johnwhite)hello Johnwhite,
thank you for your answer.
I wrote a word in uppercase, in one new document, and I tried the script but nothing happens (i have indesign cs6, mac os x 10.6.8).
Probably I do something wrong
Thank you anyway
-
5. Re: find uppercase - change in lower
vandy88 Jul 23, 2014 5:45 AM (in response to premio_oscar)Please update your word in the array list, it will do the rest.
var array = ["MARC TWAIN", "ORSON WELLES"];//update your word here
Vandy
-
6. Re: find uppercase - change in lower
premio_oscar Jul 23, 2014 5:47 AM (in response to vandy88)Hello vandy88,
the names I wrote before (MARC TWAIN, ORSON WELLES) was only example.
In my document there are a hundreds different names that I should change to lower case
Thank you
-
7. Re: find uppercase - change in lower
vandy88 Jul 23, 2014 5:50 AM (in response to premio_oscar)Try this,
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "\\u+";
finds = app.documents[0].findGrep();
for(var i=0;i<finds.length;i++){
finds[i].texts[0].changecase(ChangecaseMode.titlecase);
}
app.findGrepPreferences = app.changeGrepPreferences = null;
-
8. Re: find uppercase - change in lower
premio_oscar Jul 23, 2014 5:50 AM (in response to vandy88)Hi vandy88,
I think I would lose a lot of time to put all the names in the script.
This is not a list of names but bibliography.
Thank you a lot anyway
-
9. Re: find uppercase - change in lower
premio_oscar Jul 23, 2014 5:54 AM (in response to vandy88)Hi vandy88,
now your script is very good!
Could you make it work for just the selected text?
Thank you a lot
-
10. Re: find uppercase - change in lower
vandy88 Jul 23, 2014 6:00 AM (in response to premio_oscar)Try this,
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "\\u+";
finds = app.selection[0].findGrep();
for(var i=0;i<finds.length;i++){
finds[i].texts[0].changecase(ChangecaseMode.titlecase);
}
app.findGrepPreferences = app.changeGrepPreferences = null;
-
11. Re: find uppercase - change in lower
vandy88 Jul 23, 2014 6:14 AM (in response to vandy88)Hi premio_oscar,
script is working or not ?
if yes, mark as correct answer...
Vandy
-
12. Re: find uppercase - change in lower
premio_oscar Jul 23, 2014 6:21 AM (in response to vandy88)Hello vandy88
forgive me, I could not see before your answer.
Now I tried the script and it's great.
Thank you a lot!


