9 Replies Latest reply on Aug 12, 2014 6:10 PM by Teetan VK

    How can I set a point size for staticTexts

    Teetan VK Level 1

      Hi everyone

       

      How can I set a point size for staticTexts?

       

          staticTexts.add({staticLabel:"Please select a tedious job"});

       

      thanks

       

      Teetan

        • 1. Re: How can I set a point size for staticTexts
          pixxxel schubser Level 5

          Hi Teetan VK,

           

          please see in OMV for ScriptUI.newFont (name: String , style: String , size: Number ): ScriptUIFont

          or in Peter Kahrels Scriptui.pdf

           

          Here is an example for setting the font and the size:

          var win = new Window("dialog","blabla");
          this.windowRef = win;
          
          win.Txt1 = win.add ("statictext", undefined, "Please select");
          win.Txt1.graphics.font = ScriptUI.newFont ("Verdana", "Bold", 30);
          
          win.show();
          
          
          
          
          
          

           

           

           

          But be sure that the font is available.

           

           

          Have fun

           

          • 2. Re: How can I set a point size for staticTexts
            Teetan VK Level 1

            Thank you

            pixxxel schubser

             

            but I want set this line font size:

             

             

            var  mySelected = Number( app.extractLabel("mDialog") ),     //     previous selection’s set 

              myDialog = app.dialogs.add({name:"Tedious Jobs_(\"TDJs\")",canCancel:true}); 

              if ( isNaN( mySelected ) ) mySelected = 0; 

             

              with(myDialog){ 

                   with(dialogColumns.add()){ 

                staticTexts.add({staticLabel:"Please select a tedious job                                                            "});

                        with(dialogRows.add()){ 

                             var mySelection = dropdowns.add({stringList:["01.  xxxxxxxxxxxxxx", "02.  xxxxxxxxxxxxxxxxxxx", "03.  xxxxxxxxxxxxxxxxxxxxx","04.  xxxxxxxxxxxxxxxxxx","05.  xxxxxxxxxxxxxxx","06.  xxxxxxxxxxxxxxxxxx","07.  xxxxxxxxxxxxxxxxxxxxx"], selectedIndex: mySelected}); 

                        } 

                   with(dialogRows.add()){ 

                staticTexts.add({staticLabel:"_________________________________________________________"} );

                   with(dialogRows.add()){ 

                staticTexts.add({staticLabel:"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "}); // I want to control this line font size

                       }

                   } 

              } 

             

            if (myDialog.show() == true)

            app.doScript('main()', ScriptLanguage.JAVASCRIPT, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "Indent Paragraphs"); 

            function main(){

            var myObject;

            var myCheckSelection = false;

            if(app.documents.length > 0){

              if(app.selection.length > 0){

               switch(app.selection[0].constructor.name){

                case "InsertionPoint":

                case "Character":

                case "Word":

                case "TextStyleRange":

                case "Line":

                case "Paragraph":

                case "TextColumn":

                case "Text":

                case "Cell":

                case "Column":

                case "Row":

                case "Table":

              mySelected = app.insertLabel( "mDialog", String(mySelection.selectedIndex) );     //     to remember selection’s set 

              if(app.selection && app.selection[0].hasOwnProperty ("tedious_works") );

                  tedious_works(); 

                }

              }

            else{

              alert("Wrong selection. Please try again.");

            }

            }

            }

             

            how can I do that

             

            thank you very much

            Regard

             

            Teetan

            • 3. Re: How can I set a point size for staticTexts
              Peter Kahrel Adobe Community Professional & MVP

              Teetan,

               

              What you want isn't possible in the standard dialog model that you use. In ScriptUI windows you can change fonts and their sizes.

               

              Peter

              • 4. Re: How can I set a point size for staticTexts
                Sajeev Sridharan Level 4

                Try this,


                var userStaticText = staticTexts.add({staticLabel:"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "}); // I want to control this line font size

                userStaticText.graphics.font = ScriptUI.newFont ("Times New Roman", "Bold", 10);//Here you can adjust your font size

                 

                Vandy

                • 5. Re: Re: How can I set a point size for staticTexts
                  pixxxel schubser Level 5

                  Sajeev Sridharan,

                  I'm with Peter Kahrel.

                   

                  No chance with app.dialogs.add()

                  But possible (like I said before) with new window()

                   

                  It seems to be a little bit more expensive, otherwise you can define much more things.

                  var stringList = [
                  "01.  xxxxxxxxxxxxxa",
                  "02.  xxxxxxxxxxxxxxxxxxb",
                  "03.  xxxxxxxxxxxxxxxxxxxxc",
                  "04.  xxxxxxxxxxxxxxxxxd",
                  "05.  xxxxxxxxxxxxxxe",
                  "06.  xxxxxxxxxxxxxxxxxf",
                  "07.  xxxxxxxxxxxxxxxxxxxxg"
                  ];
                  
                  var win = new Window("dialog","Tedious Jobs_(\"TDJs\")");
                  this.windowRef = win;
                  win.grp = win.add ("group", undefined);
                  win.grp.alignChildren = "top";
                  win.grp.margins = 5;
                  
                  win.grp2 = win.grp.add ("group", undefined);
                  win.grp2.orientation = "Column";
                  win.grp2.alignChildren = "left";
                  
                  win.grp3 = win.grp.add ("group", undefined);
                  win.grp3.orientation = "Column";
                  win.grp3.alignChildren = "fill";
                  
                  win.grp2.Txt1 = win.grp2.add ("statictext", undefined, "Please select a tedious job");
                  win.grp2.Txt1.indent = 15;
                  win.grp2.Ddl1 = win.grp2.add ("dropdownlist", undefined, stringList);
                  win.grp2.Ddl1.selection = 0;
                  win.grp2.sTxt1 = win.grp2.add ("statictext", undefined, "_________________________________________________________");
                  win.grp2.sTxt2 = win.grp2.add ("statictext", undefined, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ");
                  //win.grp2.sTxt2.graphics.font = ScriptUI.newFont ("Verdana", "Bold", 11);
                  win.grp2.sTxt3 = win.grp2.add ("statictext", undefined, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ");
                  win.grp2.sTxt3.graphics.font = ScriptUI.newFont ("Verdana", "Bold", 12);
                  
                  win.quitBtn = win.grp3.add("button", undefined, "Ok");
                  win.cancelBtn = win.grp3.add("button", undefined, "Abbruch");
                  win.defaultElement = win.quitBtn;
                  win.cancelElement = win.cancelBtn;
                  win.quitBtn.onClick = function() {
                  win.close();
                  }
                  win.show();
                  
                  

                   

                  Have fun

                   

                  • 6. Re: How can I set a point size for staticTexts
                    Sajeev Sridharan Level 4

                    vandy88,

                    I'm with Peter Kahrel.

                     

                    No chance with app.dialogs.add()

                    But possible (like I said before) with new window()

                     

                    I didn't seen your previous reply, yes you're correct.... I too acknowledge with Peter Kahrel

                     

                    Vandy

                    • 7. Re: How can I set a point size for staticTexts
                      Teetan VK Level 1

                      Thank you Vandy

                      Thank you pixxxel schubser

                      And thank you Peter Kahrel

                       

                      But Ho can call function for this script?

                       

                      //======================================================================

                       

                       

                      Thank you Vandy

                      Thank you pixxxel schubser

                      And thank you Peter Kahrel

                       

                      But Ho can call function for this script?

                       

                      //======================================================================

                       

                      var stringList = [  

                      "01.  digit at end: superscript",

                      "02.  digit at beginning: superscript",

                      "03.  notes  applied to italic (table only)",

                      "04.  Initial Cap+ markup",

                      "05.  Small Cap + markup",

                      "06.  del [ ] + markup",

                      "07.  add an EM at beginning",

                      ];  

                       

                       

                      var win = new Window("dialog","Tedious Jobs_(\"TDJs\")");  

                      1. this.windowRef = win;  
                      2. win.grp = win.add ("group", undefined);  
                      3. win.grp.alignChildren = "top";  
                      4. win.grp.margins = 5;  

                       

                      1. win.grp2 = win.grp.add ("group", undefined);  
                      2. win.grp2.orientation = "Column";  
                      3. win.grp2.alignChildren = "left";  

                       

                      1. win.grp3 = win.grp.add ("group", undefined);  
                      2. win.grp3.orientation = "Column";  
                      3. win.grp3.alignChildren = "fill";  

                       

                      1. win.grp2.Txt1 = win.grp2.add ("statictext", undefined, "Please select a tedious job");  
                      2. win.grp2.Txt1.indent = 0;  
                      3. win.grp2.Ddl1 = win.grp2.add ("dropdownlist", undefined, stringList);  
                      4. win.grp2.Ddl1.selection = 0;  
                      5. win.grp2.sTxt1 = win.grp2.add ("statictext", undefined, "________________________________________");  
                      6. win.grp2.sTxt3 = win.grp2.add ("statictext", undefined, "Be careful and pay attention in what you selected.");  
                      7. win.grp2.sTxt3.graphics.font = ScriptUI.newFont ("Arial", "Regular", 10);  

                       

                      1. win.quitBtn = win.grp3.add("button", undefined, "Ok");  
                      2. win.cancelBtn = win.grp3.add("button", undefined, "Cancel");  
                      3. win.defaultElement = win.quitBtn;  
                      4. win.cancelElement = win.cancelBtn;  
                      5. win.quitBtn.onClick = function() {  

                       

                      1. win.close();  

                      }  

                        if (w.show() == 1) { 

                      //---------------------------------------------------------------------------------------- -------------------------------------------------------------------- 

                                      var mRes = mStringList.selection.text;

                                                                     

                                      mSelection = mStringList.selection.index;

                                     

                                      app.insertLabel( "mDialog", mSelection.join() );    // to store dropDownList positions (as a string "," delimited)

                                      return mRes;

                      //---------------------------------------------------------------------------------------- -------------------------------------------------------------------- 

                              } else  {  exit();  } 

                      }

                      1. app.doScript('main()', ScriptLanguage.JAVASCRIPT, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "TDJs"); 

                      function main(){

                      var myObject;

                      var myCheckSelection = false;

                      if(app.documents.length > 0){

                        if(app.selection.length > 0){

                         switch(app.selection[0].constructor.name){

                          case "InsertionPoint":

                          case "Character":

                          case "Word":

                          case "TextStyleRange":

                          case "Line":

                          case "Paragraph":

                          case "TextColumn":

                          case "Text":

                          case "Cell":

                          case "Column":

                          case "Row":

                          case "Table":

                        mySelected = app.insertLabel( "mDialog", String(mySelection.selectedIndex) );     //     to remember selection’s set 

                        if(app.selection && app.selection[0].hasOwnProperty ("tedious_works") );

                            tedious_works(); 

                          }

                        }

                      else{

                        alert("Wrong selection. Please try again.");

                      }

                      }

                      }

                      function tedious_works() {  

                        app.findGrepPreferences = app.changeGrepPreferences = null; 

                        switch (mySelection.selectedIndex){ 

                             case 1: {

                         app.findGrepPreferences.findWhat = "^\\d";

                         app.changeGrepPreferences.position = 1936749411;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                        }

                                  break; 

                             case 2:{

                         app.findGrepPreferences.findWhat = "(?i)\\(note.+\\)$";

                         app.changeGrepPreferences.appliedCharacterStyle = "Italic";

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences.findWhat = "(附[註注].+$";

                         app.changeGrepPreferences.appliedCharacterStyle = "Italic";

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                        }

                             break; 

                       

                             case 3:{

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<a";

                         app.changeGrepPreferences.changeTo = "A";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<b";

                         app.changeGrepPreferences.changeTo = "B";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<c";

                         app.changeGrepPreferences.changeTo = "C";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<d";

                         app.changeGrepPreferences.changeTo = "D";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<e";

                         app.changeGrepPreferences.changeTo = "E";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<f";

                         app.changeGrepPreferences.changeTo = "F";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<g";

                         app.changeGrepPreferences.changeTo = "G";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<h";

                         app.changeGrepPreferences.changeTo = "H";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<i";

                         app.changeGrepPreferences.changeTo = "I";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<j";

                         app.changeGrepPreferences.changeTo = "J";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<k";

                         app.changeGrepPreferences.changeTo = "K";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<l";

                         app.changeGrepPreferences.changeTo = "L";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<m";

                         app.changeGrepPreferences.changeTo = "M";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<n";

                         app.changeGrepPreferences.changeTo = "N";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<o";

                         app.changeGrepPreferences.changeTo = "O";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<p";

                         app.changeGrepPreferences.changeTo = "P";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<q";

                         app.changeGrepPreferences.changeTo = "Q";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<r";

                         app.changeGrepPreferences.changeTo = "R";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<(?<!’)s";

                         app.changeGrepPreferences.changeTo = "S";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<t";

                         app.changeGrepPreferences.changeTo = "T";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<u";

                         app.changeGrepPreferences.changeTo = "U";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<v";

                         app.changeGrepPreferences.changeTo = "V";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<w";

                         app.changeGrepPreferences.changeTo = "W";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<x";

                         app.changeGrepPreferences.changeTo = "X";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<y";

                         app.changeGrepPreferences.changeTo = "Y";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<z";

                         app.changeGrepPreferences.changeTo = "Z";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                        }

                             break; 

                       

                             case 4:{

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<A";

                         app.changeGrepPreferences.changeTo = "a";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<B";

                         app.changeGrepPreferences.changeTo = "b";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<C";

                         app.changeGrepPreferences.changeTo = "c";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<D";

                         app.changeGrepPreferences.changeTo = "d";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<E";

                         app.changeGrepPreferences.changeTo = "e";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<F";

                         app.changeGrepPreferences.changeTo = "f";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<G";

                         app.changeGrepPreferences.changeTo = "g";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<H";

                         app.changeGrepPreferences.changeTo = "h";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<I";

                         app.changeGrepPreferences.changeTo = "i";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<J";

                         app.changeGrepPreferences.changeTo = "j";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<K";

                         app.changeGrepPreferences.changeTo = "k";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<L";

                         app.changeGrepPreferences.changeTo = "l";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<M";

                         app.changeGrepPreferences.changeTo = "m";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<N";

                         app.changeGrepPreferences.changeTo = "n";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<O";

                         app.changeGrepPreferences.changeTo = "o";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<P";

                         app.changeGrepPreferences.changeTo = "p";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<Q";

                         app.changeGrepPreferences.changeTo = "q";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<R";

                         app.changeGrepPreferences.changeTo = "r";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<S";

                         app.changeGrepPreferences.changeTo = "s";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<T";

                         app.changeGrepPreferences.changeTo = "t";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<U";

                         app.changeGrepPreferences.changeTo = "u";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<V";

                         app.changeGrepPreferences.changeTo = "v";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<W";

                         app.changeGrepPreferences.changeTo = "w";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<X";

                         app.changeGrepPreferences.changeTo = "x";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<Y";

                         app.changeGrepPreferences.changeTo = "y";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\<Z";

                         app.changeGrepPreferences.changeTo = "z";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                        }

                             break; 

                       

                             case 5:{

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "\\[(.)";

                         app.changeGrepPreferences.changeTo = "$1";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                       

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "(.)\\]";

                         app.changeGrepPreferences.changeTo = "$1";

                         app.changeGrepPreferences.underline = true;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                        }

                             break; 

                       

                             case 6:{

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         app.findGrepPreferences.findWhat = "^(.)";

                         app.changeGrepPreferences.changeTo = "~m$1";

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         }

                             break; 

                       

                             default:{

                         app.findGrepPreferences.findWhat = "\\d$";

                         app.changeGrepPreferences.position = 1936749411;

                         app.selection[0].changeGrep();

                         app.findGrepPreferences = app.changeGrepPreferences = null;

                         }

                               break; 

                             } 

                      }

                       

                      //======================================================================

                       

                      Can you guy fix it?

                       

                      Regard

                      Teetan

                       

                       

                      //======================================================================

                       

                      Can you guy fix it?

                       

                      Regard

                      Teetan

                      • 8. Re: Re: How can I set a point size for staticTexts
                        pixxxel schubser Level 5

                        Oh!

                         

                        There are some mistakes.

                        First of all: remove all a.,b. c. (and so on) from the beginning of each line of my part of your mixed script. Please be careful.

                         

                        Second: You cannot mix several script without to compare the variables.

                        e.g. the old var mRes = mStringList.selection.text;

                        should be now var mRes = win.grp2.Ddl1.selection.text

                        and so on. The same with the selection index. And be careful here too. Sometimes you use mSelection in your old code, and sometimes mySelection. This cannot work (never).


                        And please – use the insert-button while posting code here in forum (possible in advanced editor)


                        Have fun


                        • 9. Re: How can I set a point size for staticTexts
                          Teetan VK Level 1

                          Hi Schubser

                           

                          I change it into this:

                          but still error

                          how can fix it?

                           

                          thank you

                          Teetan

                           

                          //======================================================================

                           

                          var stringList = [  

                          "01.  digit at end: superscript",

                          "02.  digit at beginning: superscript",

                          "03.  notes  applied to italic (table only)",

                          "04.  Initial Cap+ markup",

                          "05.  Small Cap + markup",

                          "06.  del [ ] + markup",

                          "07.  add an EM at beginning",

                          ];  

                           

                          var win = new Window("dialog","Tedious Jobs_(\"TDJs\")");  

                           

                          this.windowRef = win;  

                          win.grp = win.add ("group", undefined);  

                          win.grp.alignChildren = "top";  

                          win.grp.margins = 5;  

                           

                          //---------------------------------------------------------------------------------------- -------------------------------------------------------------------- 

                           

                          win.grp2 = win.grp.add ("group", undefined);  

                          win.grp2.orientation = "Column";  

                          win.grp2.alignChildren = "left";  

                           

                          //---------------------------------------------------------------------------------------- -------------------------------------------------------------------- 

                           

                          win.grp3 = win.grp.add ("group", undefined);  

                          win.grp3.orientation = "Column";  

                          win.grp3.alignChildren = "fill";  

                           

                          //---------------------------------------------------------------------------------------- -------------------------------------------------------------------- 

                           

                          win.grp2.Txt1 = win.grp2.add ("statictext", undefined, "Please select a tedious job");  

                          win.grp2.Txt1.indent = 0;  

                          win.grp2.Ddl1 = win.grp2.add ("dropdownlist", undefined, stringList);  

                          win.grp2.Ddl1.selection = 0;  

                          win.grp2.sTxt1 = win.grp2.add ("statictext", undefined, "________________________________________");  

                          win.grp2.sTxt3 = win.grp2.add ("statictext", undefined, "Be careful and pay attention in what you selected.");  

                          win.grp2.sTxt3.graphics.font = ScriptUI.newFont ("Arial", "Regular", 10);  

                           

                          //---------------------------------------------------------------------------------------- -------------------------------------------------------------------- 

                           

                          win.quitBtn = win.grp3.add("button", undefined, "Ok");  

                          win.cancelBtn = win.grp3.add("button", undefined, "Cancel");  

                          win.defaultElement = win.quitBtn;  

                          win.cancelElement = win.cancelBtn;  

                          win.quitBtn.onClick = function() {  

                           

                          win.close();  

                          }  

                           

                            if (w.show() == 1) { 

                           

                          //---------------------------------------------------------------------------------------- -------------------------------------------------------------------- 

                           

                                         var mRes = win.grp2.Ddl1.selection.text

                                          mSelection = mStringList.selection.index;

                                          app.insertLabel( "mDialog", mSelection.join() );    // to store dropDownList positions (as a string "," delimited)

                                          return mRes;

                           

                          //---------------------------------------------------------------------------------------- -------------------------------------------------------------------- 

                           

                                  } else  {  exit(); 

                          }

                           

                          app.doScript('main()', ScriptLanguage.JAVASCRIPT, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "TDJs"); 

                          function main(){

                          var myObject;

                          var myCheckSelection = false;

                          if(app.documents.length > 0){

                            if(app.selection.length > 0){

                             switch(app.selection[0].constructor.name){

                              case "InsertionPoint":

                              case "Character":

                              case "Word":

                              case "TextStyleRange":

                              case "Line":

                              case "Paragraph":

                              case "TextColumn":

                              case "Text":

                              case "Cell":

                              case "Column":

                              case "Row":

                              case "Table":

                            mySelected = app.insertLabel( "mDialog", String(mySelection.selectedIndex) );     //     to remember selection’s set 

                            if(app.selection && app.selection[0].hasOwnProperty ("tedious_works") );

                                tedious_works(); 

                              }

                            }

                          else{

                            alert("Wrong selection. Please try again.");

                                    }

                               }

                            }

                           

                          function tedious_works() {  

                            app.findGrepPreferences = app.changeGrepPreferences = null; 

                            switch (mySelection.selectedIndex){ 

                           

                                 case 1: {

                             app.findGrepPreferences.findWhat = "^\\d";

                             app.changeGrepPreferences.position = 1936749411;

                             app.selection[0].changeGrep();

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                            }

                                      break; 

                           

                                 case 2:{

                             app.findGrepPreferences.findWhat = "(?i)\\(note.+\\)$";

                             app.changeGrepPreferences.appliedCharacterStyle = "Italic";

                             app.selection[0].changeGrep();

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "(附[註注].+)$";

                             app.changeGrepPreferences.appliedCharacterStyle = "Italic";

                             app.selection[0].changeGrep();

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                            }

                                 break; 

                           

                           

                                 case 3:{

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                             app.findGrepPreferences.findWhat = "\\<a";

                             app.changeGrepPreferences.changeTo = "A";

                             app.changeGrepPreferences.underline = true;

                             app.selection[0].changeGrep();

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                             app.findGrepPreferences.findWhat = "\\<b";

                             app.changeGrepPreferences.changeTo = "B";

                             app.changeGrepPreferences.underline = true;

                             app.selection[0].changeGrep();

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                             app.findGrepPreferences.findWhat = "\\<c";

                             app.changeGrepPreferences.changeTo = "C";

                             app.changeGrepPreferences.underline = true;

                             app.selection[0].changeGrep();

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<d";

                           

                             app.changeGrepPreferences.changeTo = "D";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<e";

                           

                             app.changeGrepPreferences.changeTo = "E";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<f";

                           

                             app.changeGrepPreferences.changeTo = "F";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<g";

                           

                             app.changeGrepPreferences.changeTo = "G";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<h";

                           

                             app.changeGrepPreferences.changeTo = "H";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<i";

                           

                             app.changeGrepPreferences.changeTo = "I";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<j";

                           

                             app.changeGrepPreferences.changeTo = "J";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<k";

                           

                             app.changeGrepPreferences.changeTo = "K";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<l";

                           

                             app.changeGrepPreferences.changeTo = "L";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<m";

                           

                             app.changeGrepPreferences.changeTo = "M";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<n";

                           

                             app.changeGrepPreferences.changeTo = "N";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<o";

                           

                             app.changeGrepPreferences.changeTo = "O";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<p";

                           

                             app.changeGrepPreferences.changeTo = "P";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<q";

                           

                             app.changeGrepPreferences.changeTo = "Q";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<r";

                           

                             app.changeGrepPreferences.changeTo = "R";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<(?<!’)s";

                           

                             app.changeGrepPreferences.changeTo = "S";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<t";

                           

                             app.changeGrepPreferences.changeTo = "T";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<u";

                           

                             app.changeGrepPreferences.changeTo = "U";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<v";

                           

                             app.changeGrepPreferences.changeTo = "V";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<w";

                           

                             app.changeGrepPreferences.changeTo = "W";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<x";

                           

                             app.changeGrepPreferences.changeTo = "X";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<y";

                           

                             app.changeGrepPreferences.changeTo = "Y";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<z";

                           

                             app.changeGrepPreferences.changeTo = "Z";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                            }

                           

                                 break; 

                           

                           

                                 case 4:{

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<A";

                           

                             app.changeGrepPreferences.changeTo = "a";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<B";

                           

                             app.changeGrepPreferences.changeTo = "b";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<C";

                           

                             app.changeGrepPreferences.changeTo = "c";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<D";

                           

                             app.changeGrepPreferences.changeTo = "d";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<E";

                           

                             app.changeGrepPreferences.changeTo = "e";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<F";

                           

                             app.changeGrepPreferences.changeTo = "f";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<G";

                           

                             app.changeGrepPreferences.changeTo = "g";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<H";

                           

                             app.changeGrepPreferences.changeTo = "h";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<I";

                           

                             app.changeGrepPreferences.changeTo = "i";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<J";

                           

                             app.changeGrepPreferences.changeTo = "j";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<K";

                           

                             app.changeGrepPreferences.changeTo = "k";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<L";

                           

                             app.changeGrepPreferences.changeTo = "l";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<M";

                           

                             app.changeGrepPreferences.changeTo = "m";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<N";

                           

                             app.changeGrepPreferences.changeTo = "n";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<O";

                           

                             app.changeGrepPreferences.changeTo = "o";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<P";

                           

                             app.changeGrepPreferences.changeTo = "p";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<Q";

                           

                             app.changeGrepPreferences.changeTo = "q";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<R";

                           

                             app.changeGrepPreferences.changeTo = "r";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<S";

                           

                             app.changeGrepPreferences.changeTo = "s";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<T";

                           

                             app.changeGrepPreferences.changeTo = "t";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<U";

                           

                             app.changeGrepPreferences.changeTo = "u";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<V";

                           

                             app.changeGrepPreferences.changeTo = "v";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<W";

                           

                             app.changeGrepPreferences.changeTo = "w";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<X";

                           

                             app.changeGrepPreferences.changeTo = "x";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<Y";

                           

                             app.changeGrepPreferences.changeTo = "y";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\<Z";

                           

                             app.changeGrepPreferences.changeTo = "z";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                            }

                           

                                 break; 

                           

                           

                                 case 5:{

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "\\[(.)";

                           

                             app.changeGrepPreferences.changeTo = "$1";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "(.)\\]";

                           

                             app.changeGrepPreferences.changeTo = "$1";

                           

                             app.changeGrepPreferences.underline = true;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                            }

                           

                                 break; 

                           

                           

                                 case 6:{

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             app.findGrepPreferences.findWhat = "^(.)";

                           

                             app.changeGrepPreferences.changeTo = "~m$1";

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             }

                           

                                 break; 

                           

                           

                                 default:{

                           

                             app.findGrepPreferences.findWhat = "\\d$";

                           

                             app.changeGrepPreferences.position = 1936749411;

                           

                             app.selection[0].changeGrep();

                           

                             app.findGrepPreferences = app.changeGrepPreferences = null;

                           

                             }

                           

                                   break; 

                           

                                 } 

                           

                          }