1 Reply Latest reply on Sep 8, 2014 11:49 PM by eboda_snaf

    [JS CS3] Why is menu item greyed out?

    Tom Tomasko Level 1



      I have the following script that works fine on both my Mac and PC. However, I have sent it two other people and both report the same problem that the menu item shows up in the menus but all the options are greyed out.


      I thought it might be a problem of the path but when I deliberately make a wrong path on my computer I get an error message telling me the path does not exist. The two other people get no such message so there may be another problem.




      #targetengine session
      if(File.fs == "Windows"){
          var englishCheck = new File( "~/AppData/Roaming/Adobe/InDesign/Version%205.0/Scripts/Scripts%20Panel/Format/formatChec kEnglish.jsx");
          }//end if
          var englishCheck = new File( "~/Library/Preferences/Adobe%20InDesign/Version%205.0/Scripts/Scripts%20Panel/Format/form atCheckEnglish.jsx");   
      }//end else


      var englishCheckMenu = app.scriptMenuActions.add("Main-English");
      englishCheckMenu.eventListeners.add("onInvoke", englishCheck, false);


      var frenchCheckMenu = app.scriptMenuActions.add("Main-French");
      frenchCheckMenu.eventListeners.add("onInvoke", underConstruct, false);


      var spanishCheckMenu = app.scriptMenuActions.add("Main-Spanish");
      spanishCheckMenu.eventListeners.add("onInvoke", underConstruct, false);


      //following creates menu if it does not exist
          var scriptMenu = app.menus.item("$ID/Main").submenus.item("PPcheck");
      catch (e){
          var scriptMenu = app.menus.item("$ID/Main").submenus.add("PPcheck");


      //following adds sub menu items


      function underConstruct(){
          alert("The French and Spanish semi-automatic checkers are still under construction.");