<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <table class="memname">
      <tbody>
        <tr>
          <td class="memname">void FCTextExpressionDef::GetDescription </td>
          <td>(</td>
          <td class="paramtype"><a class="el"
              href="http://www.finaletips.nu/frameworkref/class_f_c_string.html">FCString</a>
            * </td>
          <td class="paramname"><em>pDescriptionString</em></td>
          <td>)</td>
          <td><br>
          </td>
        </tr>
      </tbody>
    </table>
    <p>From the online documentation: "Gets the description text for the
      text expression definition." <br>
    </p>
    <p>As can be seen from the function declaration: the Get-function
      returns void, so it probably saves the return value into the
      FCString class. That's why it needs the string as a parameter.<br>
    </p>
    <div class="gmail_default">local ted = finale.FCTextExpressionDef()<br>
    </div>
    <div class="gmail_default">if ted:Load(1) then</div>
    <div class="gmail_default">   local argString=finale.FCString()</div>
    <div class="gmail_default">   ted:GetDescription(argString) -- No
      return value<br>
         print(argString.LuaString)<br>
    </div>
    <div class="gmail_default">end</div>
    <p> You should first study Jari's examples from
      <a class="moz-txt-link-freetext" href="http://jwmusic.nu/jwplugins/wiki/doku.php?id=jwlua:quickscripts">http://jwmusic.nu/jwplugins/wiki/doku.php?id=jwlua:quickscripts</a> .
      This should solve these questions.<br>
    </p>
    Best,<br>
    Jan<br>
    <p><br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Am 10.05.2016 um 11:02 schrieb Robert
      Wildling:<br>
    </div>
    <blockquote
cite="mid:CAM9gVwR1dr1b7sQTBgsoVwxb9O3L2RtBMqtkJWOAPJMta1G8Ww@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;color:rgb(68,68,68)">Thank
          you, Jan!</div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;color:rgb(68,68,68)"><br>
        </div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;color:rgb(68,68,68)">That's
          actually exactely the way I try to get my fingers wet... but
          when getting to description, I get these examples:</div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;color:rgb(68,68,68)"><br>
        </div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;color:rgb(68,68,68)">
          <div class="gmail_default">-- Process single item:</div>
          <div class="gmail_default">local ted =
            finale.FCTextExpressionDef()</div>
          <div class="gmail_default">if ted:Load(1) then</div>
          <div class="gmail_default">   -- ('argString' must be defined
            here)</div>
          <div class="gmail_default">   ted:GetDescription(argString) --
            No return value</div>
          <div class="gmail_default">end</div>
          <div class="gmail_default"><br>
          </div>
          <div class="gmail_default">
            <div class="gmail_default">-- Process a collection of items:</div>
            <div class="gmail_default">local textexpressiondefs =
              finale.FCTextExpressionDefs()</div>
            <div class="gmail_default">textexpressiondefs:LoadAll()</div>
            <div class="gmail_default">for ted in
              each(textexpressiondefs) do</div>
            <div class="gmail_default">   -- ('argString' must be
              defined here)</div>
            <div class="gmail_default">   ted:GetDescription(argString)
              -- No return value</div>
            <div class="gmail_default">end</div>
            <div class="gmail_default">textexpressiondefs:SaveAll()</div>
            <div class="gmail_default"><br>
            </div>
            <div class="gmail_default"><br>
            </div>
            <div class="gmail_default">And I am confused, because
              GetDescription needs an argument, even though I need it to
              read what is there already... or how do I have to
              understand the "argString" usage?</div>
            <div class="gmail_default"><br>
            </div>
            <div class="gmail_default"><br>
            </div>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>
          <div class="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div>
                        <div dir="ltr">
                          <div><font size="2"><b><font color="#444444">Robert
                                  Wildling</font></b><font
                                color="#666666"><br>
                                Göllnergasse 19/30 || A-1030 Vienna</font></font></div>
                          <div><font size="2"><font color="#666666">ph:
                                +43 676 6089613<br>
                                @: <a moz-do-not-send="true"
                                  href="mailto:robertwildling@gmail.com"
                                  target="_blank">robertwildling@gmail.com</a></font></font></div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <br>
        <div class="gmail_quote">2016-05-10 10:55 GMT+02:00 <span
            dir="ltr"><<a moz-do-not-send="true"
              href="mailto:jwlua-request@jwmusic.nu" target="_blank">jwlua-request@jwmusic.nu</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Send JWLua
            mailing list submissions to<br>
                    <a moz-do-not-send="true"
              href="mailto:jwlua@jwmusic.nu">jwlua@jwmusic.nu</a><br>
            <br>
            To subscribe or unsubscribe via the World Wide Web, visit<br>
                    <a moz-do-not-send="true"
              href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu"
              rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
            or, via email, send a message with subject or body 'help' to<br>
                    <a moz-do-not-send="true"
              href="mailto:jwlua-request@jwmusic.nu">jwlua-request@jwmusic.nu</a><br>
            <br>
            You can reach the person managing the list at<br>
                    <a moz-do-not-send="true"
              href="mailto:jwlua-owner@jwmusic.nu">jwlua-owner@jwmusic.nu</a><br>
            <br>
            When replying, please edit your Subject line so it is more
            specific<br>
            than "Re: Contents of JWLua digest..."<br>
            <br>
            <br>
            Today's Topics:<br>
            <br>
               1. Re: get all items of "Expression Tool" (Bart Visser)<br>
               2. "Use Note Shapes" option ? (Jan Angerm?ller)<br>
               3. Re: get all items of "Expression Tool" (Robert
            Wildling)<br>
               4. Re: get all items of "Expression Tool" (Jan
            Angerm?ller)<br>
            <br>
            <br>
----------------------------------------------------------------------<br>
            <br>
            Message: 1<br>
            Date: Mon, 09 May 2016 21:02:36 +0200<br>
            From: Bart Visser <<a moz-do-not-send="true"
              href="mailto:bartvisser@me.com">bartvisser@me.com</a>><br>
            To: "The JW Lua script plug-in." <<a
              moz-do-not-send="true" href="mailto:jwlua@jwmusic.nu"><a class="moz-txt-link-abbreviated" href="mailto:jwlua@jwmusic.nu">jwlua@jwmusic.nu</a></a>><br>
            Subject: Re: [JW Lua] get all items of "Expression Tool"<br>
            Message-ID: <<a moz-do-not-send="true"
              href="mailto:05A763D6-720D-4B82-BB3E-6371393939C4@me.com">05A763D6-720D-4B82-BB3E-6371393939C4@me.com</a>><br>
            Content-Type: text/plain; charset=utf-8<br>
            <br>
            Hi Robert,<br>
            <br>
            Welcome to the list. As far as I know, there is no direct
            way to list all expressions in a category (there would
            probably need to be a Class-Function for something like
            that). The way to go forward is to load all
            TextEpressionDefs and look at each one of them to see if
            it?s attached to the Misc-category:<br>
            <br>
            --------<br>
            function IsMiscCategory(inputExpressionDef)<br>
              local allCategories = finale.FCCategoryDefs()<br>
              allCategories:LoadAll()<br>
              for thisCategory in each(allCategories) do<br>
                if thisCategory.ID == inputExpressionDef.CategoryID then<br>
                  local categoryName = thisCategory:CreateName()<br>
                  print(categoryName.LuaString)<br>
                  if categoryName.LuaString == "Miscellaneous" then
            return true end<br>
                end<br>
              end<br>
              return false<br>
            end -- function IsRehearsalCategory(inputExpression)<br>
            <br>
            local miscExpressions = {}<br>
            <br>
            -- This handles all TextExpression<br>
            -- In case you also need ShapeExpressions use<br>
            -- local exprdefs = finale.FCShapeExpressionDefs()<br>
            -- and repeat the process<br>
            <br>
            local exprdefs = finale.FCTextExpressionDefs()<br>
            exprdefs:LoadAll()<br>
            for exprdef in each(exprdefs) do<br>
              if IsMiscCategory(exprdef) then<br>
                    miscExpressions[#miscExpressions + 1] =
            exprdef.ItemNo<br>
              end<br>
            end<br>
            <br>
            print(#miscExpressions) -- Number of all Misc Expressions<br>
            --------<br>
            <br>
            I hope this helps.<br>
            All the best,<br>
            <br>
            <br>
            Bart Visser<br>
            <br>
            <br>
            <br>
            > Op 8 mei 2016, om 18:37 heeft Robert Wildling <<a
              moz-do-not-send="true"
              href="mailto:robertwildling@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:robertwildling@gmail.com">robertwildling@gmail.com</a></a>>
            het volgende geschreven:<br>
            ><br>
            > Hi,<br>
            ><br>
            > this is my first post and also my first day with JW Lua
            from a developer point of view. Quite amazing, what can be
            done with it!<br>
            ><br>
            > Currently I would like to adapt the awesome
            DoubleStaffMMR Lua script that is somewhere out the in the
            forums. Whenever this plugin is applied, it creates one (and
            only one!) MultiMeasureRest number to a 2-staff-system
            instruments, hiding the default settings (which make a MMR
            appear twice).<br>
            ><br>
            > The numbers are created as text expressions saved in
            the "Miscellaneous" category. The disadvantage of this
            plugin is that it creates a number for each measure, not
            checking whether a number already exists as a text
            expression. So I would like to fetch all the data that can
            be found in the "Miscellaneous" category, check against the
            "Description" field (where is says
            "DoubleStaffMMR_[number]") and use the existing item, or
            only then create a new item.<br>
            ><br>
            > That's the theory. Now for the practical part: How do I
            fetch all items from the "Miscellaneous" category?<br>
            ><br>
            > Thanks for any tips!<br>
            ><br>
            > Greetings,<br>
            > Robert<br>
            > _______________________________________________<br>
            > JWLua mailing list<br>
            > <a moz-do-not-send="true"
              href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a><br>
            > <a moz-do-not-send="true"
              href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu"
              rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
            <br>
            <br>
            <br>
            <br>
            ------------------------------<br>
            <br>
            Message: 2<br>
            Date: Mon, 9 May 2016 21:39:31 +0200<br>
            From: Jan Angerm?ller <<a moz-do-not-send="true"
              href="mailto:jan@angermueller.com">jan@angermueller.com</a>><br>
            To: "The JW Lua script plug-in." <<a
              moz-do-not-send="true" href="mailto:jwlua@jwmusic.nu"><a class="moz-txt-link-abbreviated" href="mailto:jwlua@jwmusic.nu">jwlua@jwmusic.nu</a></a>><br>
            Subject: [JW Lua] "Use Note Shapes" option ?<br>
            Message-ID: <<a moz-do-not-send="true"
              href="mailto:f9725493-e670-a460-d685-4c59d8545f62@angermueller.com">f9725493-e670-a460-d685-4c59d8545f62@angermueller.com</a>><br>
            Content-Type: text/plain; charset=utf-8; format=flowed<br>
            <br>
            Jari (and all),<br>
            <br>
            is the "Use Note Shapes" option from Document
            Options->Notes and Rests<br>
            with all its sub-parameters available yet ? I was asked for
            support of<br>
            scale degree noteheads. But it seems to be not possible yet.<br>
            <br>
            Best,<br>
            Jan<br>
            <br>
            <br>
            <br>
            ------------------------------<br>
            <br>
            Message: 3<br>
            Date: Tue, 10 May 2016 10:44:41 +0200<br>
            From: Robert Wildling <<a moz-do-not-send="true"
              href="mailto:robertwildling@gmail.com">robertwildling@gmail.com</a>><br>
            To: <a moz-do-not-send="true"
              href="mailto:jwlua@jwmusic.nu">jwlua@jwmusic.nu</a><br>
            Subject: Re: [JW Lua] get all items of "Expression Tool"<br>
            Message-ID:<br>
                    <CAM9gVwQnpsfam7bXxcW=<a moz-do-not-send="true"
              href="mailto:g%2B4_wszO6qgSpfs5YhHe9_UeC1QVYQ@mail.gmail.com">g+4_wszO6qgSpfs5YhHe9_UeC1QVYQ@mail.gmail.com</a>><br>
            Content-Type: text/plain; charset="utf-8"<br>
            <br>
            Thank you for your script, Bart Visser! That is extremly
            helpful!!!<br>
            <br>
            At the moment I am struggeling with getting the text of the
            Description<br>
            field (of a Expression Tool item). The "JW Lua" Class
            Browser offers a<br>
            GetDescription(argString) method (without a return value?),
            but it<br>
            obviously needs a string to do something. Instead, I need to
            read and<br>
            return the Description in order to compare it to another
            string...<br>
            <br>
            local str = finale.FCString()<br>
            str.LuaString = [a variable from somewhere else like
            "DoubleStaffMMR5"]<br>
            <br>
            ... and now?<br>
            <br>
            Any hint would be most welcome!<br>
            Thanks!<br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            *Robert Wildling*<br>
            G?llnergasse 19/30 || A-1030 Vienna<br>
            ph: <a moz-do-not-send="true"
              href="tel:%2B43%20676%206089613" value="+436766089613">+43
              676 6089613</a><br>
            @: <a moz-do-not-send="true"
              href="mailto:robertwildling@gmail.com">robertwildling@gmail.com</a><br>
            <br>
            2016-05-08 18:37 GMT+02:00 Robert Wildling <<a
              moz-do-not-send="true"
              href="mailto:robertwildling@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:robertwildling@gmail.com">robertwildling@gmail.com</a></a>>:<br>
            <br>
            > Hi,<br>
            ><br>
            > this is my first post and also my first day with JW Lua
            from a developer<br>
            > point of view. Quite amazing, what can be done with it!<br>
            ><br>
            > Currently I would like to adapt the awesome
            DoubleStaffMMR Lua script that<br>
            > is somewhere out the in the forums. Whenever this
            plugin is applied, it<br>
            > creates one (and only one!) MultiMeasureRest number to
            a 2-staff-system<br>
            > instruments, hiding the default settings (which make a
            MMR appear twice).<br>
            ><br>
            > The numbers are created as text expressions saved in
            the "Miscellaneous"<br>
            > category. The disadvantage of this plugin is that it
            creates a number for<br>
            > each measure, not checking whether a number already
            exists as a text<br>
            > expression. So I would like to fetch all the data that
            can be found in the<br>
            > "Miscellaneous" category, check against the
            "Description" field (where is<br>
            > says "DoubleStaffMMR_[number]") and use the existing
            item, or only then<br>
            > create a new item.<br>
            ><br>
            > That's the theory. Now for the practical part: How do I
            fetch all items<br>
            > from the "Miscellaneous" category?<br>
            ><br>
            > Thanks for any tips!<br>
            ><br>
            > Greetings,<br>
            > Robert<br>
            ><br>
            -------------- next part --------------<br>
            An HTML attachment was scrubbed...<br>
            URL: <<a moz-do-not-send="true"
href="http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20160510/adb929a1/attachment-0001.html"
              rel="noreferrer" target="_blank">http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20160510/adb929a1/attachment-0001.html</a>><br>
            <br>
            ------------------------------<br>
            <br>
            Message: 4<br>
            Date: Tue, 10 May 2016 10:55:08 +0200<br>
            From: Jan Angerm?ller <<a moz-do-not-send="true"
              href="mailto:jan@angermueller.com">jan@angermueller.com</a>><br>
            To: "The JW Lua script plug-in." <<a
              moz-do-not-send="true" href="mailto:jwlua@jwmusic.nu"><a class="moz-txt-link-abbreviated" href="mailto:jwlua@jwmusic.nu">jwlua@jwmusic.nu</a></a>><br>
            Subject: Re: [JW Lua] get all items of "Expression Tool"<br>
            Message-ID: <<a moz-do-not-send="true"
              href="mailto:b9e7b7fc-913a-6809-9e29-493ff5af31a1@angermueller.com">b9e7b7fc-913a-6809-9e29-493ff5af31a1@angermueller.com</a>><br>
            Content-Type: text/plain; charset="windows-1252";
            Format="flowed"<br>
            <br>
            Hi Robert,<br>
            <br>
            you should use the JW Lua class browser, the online class
            documentation<br>
            and the examples that Jari put on his website to find this
            out.<br>
            <br>
            The online class documentation starts here:<br>
            <a moz-do-not-send="true"
              href="http://www.finaletips.nu/frameworkref/annotated.html"
              rel="noreferrer" target="_blank">http://www.finaletips.nu/frameworkref/annotated.html</a><br>
            So you browse to FCTextExpressionDef and search for
            "Description" and<br>
            you will have your solution.<br>
            <br>
            The same result can be found in the JW Lua class browser:<br>
            Go to FCTextExpressionDef and enter "Description" in the
            Properties<br>
            and/or Methods search fields. Then you'll even get a sample
            code.<br>
            <br>
            Best,<br>
            Jan<br>
            <br>
            <br>
            <br>
            Am 10.05.2016 um 10:44 schrieb Robert Wildling:<br>
            > Thank you for your script, Bart Visser! That is
            extremly helpful!!!<br>
            ><br>
            > At the moment I am struggeling with getting the text of
            the<br>
            > Description field (of a Expression Tool item). The "JW
            Lua" Class<br>
            > Browser offers a GetDescription(argString) method
            (without a return<br>
            > value?), but it obviously needs a string to do
            something. Instead, I<br>
            > need to read and return the Description in order to
            compare it to<br>
            > another string...<br>
            ><br>
            > local str = finale.FCString()<br>
            > str.LuaString = [a variable from somewhere else like
            "DoubleStaffMMR5"]<br>
            ><br>
            > ... and now?<br>
            ><br>
            > Any hint would be most welcome!<br>
            > Thanks!<br>
            ><br>
            ><br>
            ><br>
            ><br>
            ><br>
            ><br>
            ><br>
            > *Robert Wildling*<br>
            > G?llnergasse 19/30 || A-1030 Vienna<br>
            > ph: +43 676 6089613<br>
            > @: <a moz-do-not-send="true"
              href="mailto:robertwildling@gmail.com">robertwildling@gmail.com</a>
            <mailto:<a moz-do-not-send="true"
              href="mailto:robertwildling@gmail.com">robertwildling@gmail.com</a>><br>
            ><br>
            > 2016-05-08 18:37 GMT+02:00 Robert Wildling <<a
              moz-do-not-send="true"
              href="mailto:robertwildling@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:robertwildling@gmail.com">robertwildling@gmail.com</a></a><br>
            > <mailto:<a moz-do-not-send="true"
              href="mailto:robertwildling@gmail.com">robertwildling@gmail.com</a>>>:<br>
            ><br>
            >     Hi,<br>
            ><br>
            >     this is my first post and also my first day with JW
            Lua from a<br>
            >     developer point of view. Quite amazing, what can be
            done with it!<br>
            ><br>
            >     Currently I would like to adapt the awesome
            DoubleStaffMMR Lua<br>
            >     script that is somewhere out the in the forums.
            Whenever this<br>
            >     plugin is applied, it creates one (and only one!)
            MultiMeasureRest<br>
            >     number to a 2-staff-system instruments, hiding the
            default<br>
            >     settings (which make a MMR appear twice).<br>
            ><br>
            >     The numbers are created as text expressions saved
            in the<br>
            >     "Miscellaneous" category. The disadvantage of this
            plugin is that<br>
            >     it creates a number for each measure, not checking
            whether a<br>
            >     number already exists as a text expression. So I
            would like to<br>
            >     fetch all the data that can be found in the
            "Miscellaneous"<br>
            >     category, check against the "Description" field
            (where is says<br>
            >     "DoubleStaffMMR_[number]") and use the existing
            item, or only then<br>
            >     create a new item.<br>
            ><br>
            >     That's the theory. Now for the practical part: How
            do I fetch all<br>
            >     items from the "Miscellaneous" category?<br>
            ><br>
            >     Thanks for any tips!<br>
            ><br>
            >     Greetings,<br>
            >     Robert<br>
            ><br>
            ><br>
            ><br>
            ><br>
            > _______________________________________________<br>
            > JWLua mailing list<br>
            > <a moz-do-not-send="true"
              href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a><br>
            > <a moz-do-not-send="true"
              href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu"
              rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
            <br>
            -------------- next part --------------<br>
            An HTML attachment was scrubbed...<br>
            URL: <<a moz-do-not-send="true"
href="http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20160510/a2be370f/attachment.html"
              rel="noreferrer" target="_blank">http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20160510/a2be370f/attachment.html</a>><br>
            <br>
            ------------------------------<br>
            <br>
            Subject: Digest Footer<br>
            <br>
            _______________________________________________<br>
            JWLua mailing list<br>
            <a moz-do-not-send="true" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a><br>
            <a moz-do-not-send="true"
              href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu"
              rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
            <br>
            <br>
            ------------------------------<br>
            <br>
            End of JWLua Digest, Vol 34, Issue 3<br>
            ************************************<br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
JWLua mailing list
<a class="moz-txt-link-abbreviated" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a>
<a class="moz-txt-link-freetext" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>