2 Replies Latest reply on Dec 4, 2014 10:05 AM by hamdifem

    This script to How do I make the font condition

    hamdifem Level 1
      main ();
      function main(){
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
        if(app.documents.length >= 1){
              var myDoc=app.activeDocument;
              editT(myDoc);
              }
          else
           {
        alert("Pleace Open İndesign Doc");
        }  
      }
      function editT(myDoc)
      {
          var oldA =["a", "b", "c"]
          var newA =["1", "2", "3"]
          var changee =[["α",0],["é",0],["β",0]]
      if (myDoc.appliedFont == "Symbol"){  //?????????????????????
          for (var i=0; i<oldA.length; i++)
          {
              app.findTextPreferences = NothingEnum.nothing;
              app.changeTextPreferences = NothingEnum.nothing;
              app.findChangeTextOptions.caseSensitive = true;
              app.findChangeTextOptions.includeFootnotes = false;
              app.findChangeTextOptions.includeHiddenLayers = false;
              app.findChangeTextOptions.includeLockedLayersForFind = false;
              app.findChangeTextOptions.includeLockedStoriesForFind = false;
              app.findChangeTextOptions.includeMasterPages = false;
              app.findChangeTextOptions.wholeWord = false;
              app.findTextPreferences.findWhat = oldA[i]
              app.changeTextPreferences.changeTo = newA[i];
              changee[i][1] = app.activeDocument.changeText().length;
              myDoc.changeText();
              app.findTextPreferences = NothingEnum.nothing;
              app.changeTextPreferences = NothingEnum.nothing;  
      }
      }
      }