<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
Robert, that 'Optional' field seems to lose any carriage returns I put in between opening. So if I put in<div><br></div><div>tacet_text = "TACET"</div><div>al_fine_text = "tacet al fine"</div><div><br></div><div>When I open after restarting Finale I get:</div><div>tacet_text = "TACET"al_fine_text = "tacet al fine"</div><div><br></div><div>For this particular script it's not a huge deal, but for setting up anything with a high degree of customization that could end up being really problematic. Is there any way to fix that behavior?</div><div><br></div><div>-Jake<br><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">On 2/2/2022 1:53:56 PM, jwlua-request@jwmusic.nu <jwlua-request@jwmusic.nu> wrote:</p><div style="font-family:Arial,Helvetica,sans-serif">Send JWLua mailing list submissions to
<br> jwlua@jwmusic.nu
<br>
<br>To subscribe or unsubscribe via the World Wide Web, visit
<br> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
<br>or, via email, send a message with subject or body 'help' to
<br> jwlua-request@jwmusic.nu
<br>
<br>You can reach the person managing the list at
<br> jwlua-owner@jwmusic.nu
<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: JWLua Digest, Vol 88, Issue 4 (Jacob Winkler)
<br>
<br>
<br>----------------------------------------------------------------------
<br>
<br>Message: 1
<br>Date: Wed, 02 Feb 2022 13:53:13 -0800
<br>From: "Jacob Winkler" <jacob.winkler@mac.com>
<br>To: "" <jwlua@jwmusic.nu>
<br>Subject: Re: [JW Lua] JWLua Digest, Vol 88, Issue 4
<br>Message-ID: <mailbird-c8ed1cd0-140d-4096-ba8d-6005d43033c2@mac.com>
<br>Content-Type: text/plain; charset="utf-8"
<br>
<br>
<br>Yep! Both solutions worked:
<br>tacet_text = tacet_text or "TACET"
<br>
<br>is what I I used here, but the other method with ' if == nil then ' also worked.
<br>
<br>
<br>Thanks Robert!
<br>On 2/2/2022 1:38:53 PM, jwlua-request@jwmusic.nu <jwlua-request@jwmusic.nu> wrote:
<br>Send JWLua mailing list submissions to
<br>jwlua@jwmusic.nu
<br>
<br>To subscribe or unsubscribe via the World Wide Web, visit
<br>http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
<br>or, via email, send a message with subject or body 'help' to
<br>jwlua-request@jwmusic.nu
<br>
<br>You can reach the person managing the list at
<br>jwlua-owner@jwmusic.nu
<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: Using the 'Optional' code field in RGP Lua (Robert Patterson)
<br>
<br>
<br>----------------------------------------------------------------------
<br>
<br>Message: 1
<br>Date: Wed, 2 Feb 2022 15:38:00 -0600
<br>From: Robert Patterson
<br>To: "The JW Lua script plug-in."
<br>Subject: Re: [JW Lua] Using the 'Optional' code field in RGP Lua
<br>Message-ID:
<br>
<br>Content-Type: text/plain; charset="utf-8"
<br>
<br>This may also work in your script instead of the if statement. Not sure.
<br>But if it does I'd like to know.
<br>
<br>tacet_text = tacet_text or "TACET"
<br>
<br>
<br>
<br>On Wed, Feb 2, 2022 at 3:21 PM Robert Patterson
<br>wrote:
<br>
<br>> I don't think you need a local variable at all. In your script write
<br>>
<br>> if tacet_text == nil then
<br>> tacet_text = "TACET'
<br>> end
<br>>
<br>> In your prefix write:
<br>>
<br>> tacet_text = "IT WORKS!"
<br>>
<br>>
<br>> On Wed, Feb 2, 2022 at 2:02 PM Jacob Winkler
<br>> wrote:
<br>>
<br>>> Hey folks, and by folks I may mean mostly Robert Patterson, can anyone
<br>>> offer some advice on how to use the new 'Optional' field in RGP Lua? It
<br>>> seems like the perfect place for a user to store their own custom
<br>>> variables, but I'm having a little difficulty with it.
<br>>>
<br>>> In the screenshot below, you can see that I am successfully setting up my
<br>>> 'user variable'. However, I want the script to not RELY on the presence of
<br>>> the user variable, I want it to work no matter what. To that end, I set up
<br>>> an if/then that tests to see if my user variable is nil. If it is not nil,
<br>>> then the script will use its value. If it IS nil, then it will use another
<br>>> value that I have hard coded. Seems like it should work... But it doesn't.
<br>>>
<br>>>
<br>>> Any suggestions on how this could be set up better?
<br>>>
<br>>> -Jake
<br>>> _______________________________________________
<br>>> JWLua mailing list
<br>>> JWLua@jwmusic.nu
<br>>> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
<br>>>
<br>>
<br>-------------- next part --------------
<br>An HTML attachment was scrubbed...
<br>URL:
<br>-------------- next part --------------
<br>A non-text attachment was scrubbed...
<br>Name: image.png
<br>Type: image/png
<br>Size: 64736 bytes
<br>Desc: not available
<br>URL:
<br>
<br>------------------------------
<br>
<br>Subject: Digest Footer
<br>
<br>_______________________________________________
<br>JWLua mailing list
<br>JWLua@jwmusic.nu
<br>http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
<br>
<br>
<br>------------------------------
<br>
<br>End of JWLua Digest, Vol 88, Issue 4
<br>************************************
<br>-------------- next part --------------
<br>An HTML attachment was scrubbed...
<br>URL: <http: jwmusic.nu="" pipermail="" jwlua_jwmusic.nu="" attachments="" 20220202="" 922d9768="" attachment.html="">
<br>-------------- next part --------------
<br>A non-text attachment was scrubbed...
<br>Name: image.png
<br>Type: image/png
<br>Size: 30610 bytes
<br>Desc: not available
<br>URL: <http: jwmusic.nu="" pipermail="" jwlua_jwmusic.nu="" attachments="" 20220202="" 922d9768="" attachment.png="">
<br>
<br>------------------------------
<br>
<br>Subject: Digest Footer
<br>
<br>_______________________________________________
<br>JWLua mailing list
<br>JWLua@jwmusic.nu
<br>http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
<br>
<br>
<br>------------------------------
<br>
<br>End of JWLua Digest, Vol 88, Issue 5
<br>************************************
<br></http:></http:></jwlua-request@jwmusic.nu></mailbird-c8ed1cd0-140d-4096-ba8d-6005d43033c2@mac.com></jwlua@jwmusic.nu></jacob.winkler@mac.com></div></blockquote>
</div></div>