3 Replies Latest reply on Nov 26, 2011 5:43 PM by Jump_Over

    Checking non_char lines

    Jump_Over Level 5


      I am a beginner, so be patient, pls. Lost to many hours for finding solution, so decide to ask you, if u so kind...


      myStory is some of paragraphs selected (app.selection[0].paragraphs).

      I need to check if are there some paragraphs filled by SpecialCharacters only, means they have some .length but .contents is "Undefined".

      Can u help me how to refer to those kind of contents of myStory?


      Thx for your time



        • 1. Re: Checking non_char lines
          Jump_Over Level 5

          OK. Is closed and sorry for some kind of spam from your side maybe...


          I find myStory.words.length == 0 result good enough for my check wishes.


          So I was at the brink of disaster and now made a step forward

          • 2. Re: Checking non_char lines
            [Jongware] Most Valuable Participant

            Does using words yield a different result than, say, characters? (I'd try but I am, uh, "working" on my iPad rite now.)

            • 3. Re: Checking non_char lines
              Jump_Over Level 5

              Hm, using words helps me to pass over my JS ignorance.


              My problem is to discover how can I ask program if inside my selection are paragraphs built from special characters only, cause I don't know a common name for those content.

              It can be one or more, mixed in different ways... So  I tried to catch them one by one by enumeration but I am quiet sure that there is a way to one_line_name it.

              escape(Object.contents) results unicode; object.contents results undefined. But Object.contents == undefined results false.


              words.length == 0 gives me result without checking how many are they and what kind... but do not push me deeper into the JS Kingdom. Rgds