4 Replies Latest reply on Nov 4, 2015 5:47 AM by LeoMari

    Superscript underlined very thin

    beto correa Level 1

      I have many Indesign files and I need to change the underlined of words from 0.1 to 0.4 pt. It is possibble through by script?

        • 1. Re: Superscript underlined very thin
          LeoMari Level 2

          I do not remember where I found this script, a long time in some forum ..

          It works well for my line of work ..

           

              function main(){
              function resetOpt() {
                var old_fCGOpts = app.findChangeGrepOptions.properties;
                var old_fGPref = app.findGrepPreferences.properties;
                var old_cGPref = app.changeGrepPreferences.properties;
          
                app.findChangeGrepOptions = NothingEnum.NOTHING;
                app.findGrepPreferences = NothingEnum.NOTHING;
                app.changeGrepPreferences = NothingEnum.NOTHING;
                return [old_fCGOpts, old_fGPref, old_cGPref]
              }
          
              function restoreOpt(myOpt) {
                app.findChangeGrepOptions.properties = myOpt[0];
                app.findGrepPreferences.properties = myOpt[1];
                app.changeGrepPreferences.properties = myOpt[2];
              }
                  var myOpt=resetOpt ();
                  app.findGrepPreferences.underline=true;
                  var myRes=app.activeDocument.findGrep(), l=myRes.length;
                  while (l--){
                      if (myRes[l].underlineWeight<0.11){
                          myRes[l].underlineWeight=0.4;}
                      }
          
              restoreOpt (myOpt);
              }
              app.doScript('main()', undefined, undefined, UndoModes.entireScript, 'Fix Underline');
          
          

           

          If it works thank the author whoever he may be wherever you are...rsrs

          hug!

          • 3. Re: Superscript underlined very thin
            beto correa Level 1

            Hi LeoMari

             

            Great! Exatly it.

            Thanks

            • 4. Re: Superscript underlined very thin
              LeoMari Level 2

              Yes!! Credit to Vamitul!!

              Very good