Make a words Sentence Case?


hi i'm making script change main changes in document.  i'm sure grep handle again i'm trying combine 6 different functions 1 script.  how go changing 2 lines of text sentence case? top line need changed , bottom 2 need changed sentence case.  there way add grep string script? 

 

the title case works here "this line can left alond"

the sentence case works needs changed here

the sentence case works needs changed here

here's script far.  grep style changes use grep styles have in indesign.  or if possible ones. replace have ton more time i;m done again grep need with.

//description: running changes.

 

//replace("<cr>", "return") 

//~  created chris bishop - (5-3-16)  

 

    replace(" <cr> ", "^p") 

    replace("  ", " ")

    replace(" :", ":")

    replace(" .", ".")

    replace("^p^p", "^p")

    replace(" <cr>", "^p")

  

 

        function replace(input, output) 

        { 

            app.selection[0]; 

            app.findtextpreferences = app.changetextpreferences = nothingenum.nothing; 

            app.findtextpreferences.findwhat = input; 

            app.changetextpreferences.changeto = output; 

            app.activedocument.changetext(); 

          

        } 

 

//~     grep style changes

 

 

 

 

 

 

//~  alert message shown when running script. 

try{ 

    { 

      

        mytext.pointsize = mytext.pointsize - .01; 

        } while (mytextframe.overflows == true); 

    } 

catch(e){ 

    alert("text formatted") 



More discussions in InDesign Scripting


adobe

Comments

Popular posts from this blog

Soustraire une selection

After Effects: could not find dvaeve_dialogs.txt

Illustrator cs6 "Invalid Serial Number"