2 Replies Latest reply on Feb 22, 2011 8:17 AM by ravicsadobe1

    Action is not enabled - error

    ravicsadobe1

      When I try to invoke the italic using

       

      this.app.menuActions.itemByID(119611).invoke()

       

      , I get the above error "Action is not enabled".

       

      When I try enable it using

      this.app.menuActions.itemByID(119611).enabled=true;

       

      I get the error that the above property is readable only.

       

      Which setting/script should I change to enable it??

      I am working on cs5 server/cs5.

       

      Thanks

      Ravi

        • 1. Re: Action is not enabled - error
          [Jongware]-9BC6tI Level 4

          I bet this means you don't have any text selected (which is what would enable the "Italics" menu item).

          • 2. Re: Action is not enabled - error
            ravicsadobe1 Level 1

              alert(itemSubElements.item(textvsub).contents);
              var mySelection = this.app.selection;
              itemSubElements.item(textvsub).select();     //1

            //this.app.select(itemSubElements.item(textvsub));   //2
               var itemIDitalic=this.app.menuActions.itemByID(119611);

                itemIDitalic.invoke(); // apply italics - same as [cmd]+[shift]+[i]

                this.app.select(mySelection );
              getStylishcharacters(itemSubElements.item(textvsub),charactertype);

             

             

            The above is the code which I am trying to use. We are using cell styles and paragraph styles.

            The alert at the top prints the contents fine.

             

            I have tried to use //1 and //2 alternatively, but both failed at .invoke();