<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hi Scott!<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Yes! Your script works beautifully!<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thank you very much. So, I guess I owe you a beer (or a lunch) at tekom tcworld in Stuttgart (I hope you can wait that long)?<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Cheers!<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Yves<br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 6, 2015 at 6:58 PM, Scott Prentice <span dir="ltr"><<a href="mailto:sp14@leximation.com" target="_blank">sp14@leximation.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#336666">
    <font face="Verdana">OK .. couldn't resist. Try this ..<br>
      <br>
      --------------------<br>
      var doc = app.ActiveDoc;<br>
      // these para tags must already exist<br>
      var pgfFormat1 = doc.GetNamedObject(Constants.FO_PgfFmt,
      "listitem1");<br>
      var pgfFormat2 = doc.GetNamedObject(Constants.FO_PgfFmt,
      "listitem2");<br>
      <br>
      if ((!pgfFormat1.ObjectValid()) || (!pgfFormat2.ObjectValid())) {<br>
          alert("Para tags must exist!");<br>
      }<br>
      else<br>
      {<br>
          var pgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;<br>
      <br>
          while(pgf.ObjectValid() == true) <br>
          {<br>
              var autonum = pgf.AutoNumString + "";<br>
              if (autonum.length > 0) {<br>
                  if (autonum.substring(0, 3) == "•\\t") {<br>
                      var props = pgfFormat1.GetProps();<br>
                      pgf.SetProps(props);<br>
                  }<br>
                  else if (autonum.substring(0, 3) == "o\\t") {<br>
                      var props = pgfFormat2.GetProps();<br>
                      pgf.SetProps(props);<br>
                  }<br>
              }<br>
              pgf = pgf.NextPgfInFlow;<br>
          }<br>
      }</font><br>
    <font face="Verdana">--------------------<br>
      <br>
      Cheers!<span class="HOEnZb"><font color="#888888"><br>
      ...scott<br>
    </font></span></font><div><div class="h5">
    <div>On 3/6/15 9:28 AM, Scott Prentice
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <font face="Verdana">Hi Yves...<br>
        <br>
        The answer to your questions is .. Yes!  :-)<br>
        <br>
        If you're looking for the code to do it, that might take a bit
        more time. Some generous developer might post the code for you,
        I'll provide some pseudo-code ..<br>
        <br>
        - iterate each paragraph in the document<br>
        - check the autonumber format value .. <br>
        - if autonum string starts with "•\t" .. assign the "listitem1"
        para tag<br>
        - if autonum string starts with "o\t" .. assign the "listitem2"
        para tag<br>
        <br>
        This should actually be pretty simple .. I just can't do it
        right now. If no one else does, I might though.  :o<br>
        <br>
        Cheers,<br>
        ...scott<br>
        <br>
        <br>
        <br>
      </font>
      <div>On 3/6/15 5:07 AM, Yves Barbion
        wrote:<br>
      </div>
      <blockquote type="cite">
        <div dir="ltr">
          <div style="font-family:verdana,sans-serif">Hi group<br>
            <br>
          </div>
          <div style="font-family:verdana,sans-serif">I've got a FrameMaker
            file which was converted from a Word document. The
            FrameMaker file contains the paratag [List Paragraph] but
            this tag is also used by "nested" bulleted lists.
            Consequently, the autonumber format is as follows:<br>
            <br>
            •\t for top-level list items<br>
            o\t for second-level list items<br>
            <br>
          </div>
          <div style="font-family:verdana,sans-serif">Is there a way to
            rename the paratag based on the autonumber format, for
            example:<br>
            <br>
          </div>
          <div style="font-family:verdana,sans-serif">rename [List
            Paragraph] with the •\t autonumber format to [listitem1]<br>
          </div>
          <div style="font-family:verdana,sans-serif">
            <div style="font-family:verdana,sans-serif">rename [List
              Paragraph] with the o\t autonumber format to [listitem2]<br>
            </div>
            <br>
            <br>
          </div>
          <div style="font-family:verdana,sans-serif">Thanks<br>
          </div>
          <div style="font-family:verdana,sans-serif"><br>
          </div>
          -- <br>
          <div>Yves Barbion<br>
            <a href="http://www.scripto.nu" target="_blank">www.scripto.nu</a></div>
        </div>
        <br>
        <fieldset></fieldset>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
<br>
<br>
You are currently subscribed to framers as <a href="mailto:yves.barbion@gmail.com">yves.barbion@gmail.com</a>.<br>
<br>
Send list messages to <a href="mailto:framers@lists.frameusers.com">framers@lists.frameusers.com</a>.<br>
<br>
To unsubscribe send a blank email to<br>
<a href="mailto:framers-unsubscribe@lists.frameusers.com">framers-unsubscribe@lists.frameusers.com</a><br>
or visit <a href="http://lists.frameusers.com/mailman/options/framers/yves.barbion%40gmail.com" target="_blank">http://lists.frameusers.com/mailman/options/framers/yves.barbion%40gmail.com</a><br>
<br>
Send administrative questions to <a href="mailto:listadmin@frameusers.com">listadmin@frameusers.com</a>. Visit<br>
<a href="http://www.frameusers.com/" target="_blank">http://www.frameusers.com/</a> for more resources and info.<br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Yves Barbion<br><a href="http://www.scripto.nu">www.scripto.nu</a></div>
</div></div>