4 Replies Latest reply on Feb 7, 2013 12:10 AM by Trevorׅ

    error/warning when tagging

    vincent 1982 Level 1

      Hello,

       

      When i tag an item i sometimes get the following message : "Content contains characters which cannot be encoded error".

       

      Wel its actually more like a warning message, but the big problem is that i can come multiple times.

      When i click ok i get another one and another one, etc...

       

      I've read that it has something to do with these characters not having a unicode. But is there any way i can avoid having this message?

      Are there any settings i can fill adjust to avoid this?

        • 1. Re: error/warning when tagging
          Trevorׅ Adobe Community Professional

          Ji Vincent

           

          Try

          app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
          

          Note it's good practice to restore the old level so do like this.

           

          uia = app.scriptPreferences.userInteractionLevel;
          app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
          doscript (............
          app.scriptPreferences.userInteractionLevel =  uia
          

          I don't know if it will help but worth a go

           

          Trevor

          • 2. Re: error/warning when tagging
            vincent 1982 Level 1

            As usual, works like a charm.

             

            I don't know how you come up with these things but i'm sure glad you do.

            • 3. Re: error/warning when tagging
              Vamitul Level 4

              Trevor.. you are a hero! i'we been looking for this for ages!

              one question: if i set this at the beginning of my scripts, will the user still be able to interact with the scriptUI palette (i have a script that lists on one side all the xml tags form the document, and on the other side all the charater and paragraph styles, so the user can appy the chosen style without mapping it first), or should i just set it before changing the document?

              • 4. Re: error/warning when tagging
                Trevorׅ Adobe Community Professional

                Nice to be a hero

                 

                Well you could always try for yourself but it doesn't stop scripted UI's alerts, prompts, etc. which is what you would want and is quite sensible.