[JW Lua] JWLua Digest, Vol 88, Issue 5

Jacob Winkler jacob.winkler at mac.com
Wed Feb 2 23:28:07 CET 2022


Robert, that 'Optional' field seems to lose any carriage returns I put in between opening. So if I put in

tacet_text = "TACET"
al_fine_text = "tacet al fine"

When I open after restarting Finale I get:
tacet_text = "TACET"al_fine_text = "tacet al fine"

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?

-Jake

On 2/2/2022 1:53:56 PM, jwlua-request at jwmusic.nu <jwlua-request at jwmusic.nu> wrote:
Send JWLua mailing list submissions to
jwlua at jwmusic.nu

To subscribe or unsubscribe via the World Wide Web, visit
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
or, via email, send a message with subject or body 'help' to
jwlua-request at jwmusic.nu

You can reach the person managing the list at
jwlua-owner at jwmusic.nu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of JWLua digest..."


Today's Topics:

1. Re: JWLua Digest, Vol 88, Issue 4 (Jacob Winkler)


----------------------------------------------------------------------

Message: 1
Date: Wed, 02 Feb 2022 13:53:13 -0800
From: "Jacob Winkler"
To: ""
Subject: Re: [JW Lua] JWLua Digest, Vol 88, Issue 4
Message-ID:
Content-Type: text/plain; charset="utf-8"


Yep! Both solutions worked:
tacet_text = tacet_text or "TACET"

is what I I used here, but the other method with ' if == nil then ' also worked.


Thanks Robert!
On 2/2/2022 1:38:53 PM, jwlua-request at jwmusic.nu wrote:
Send JWLua mailing list submissions to
jwlua at jwmusic.nu

To subscribe or unsubscribe via the World Wide Web, visit
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
or, via email, send a message with subject or body 'help' to
jwlua-request at jwmusic.nu

You can reach the person managing the list at
jwlua-owner at jwmusic.nu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of JWLua digest..."


Today's Topics:

1. Re: Using the 'Optional' code field in RGP Lua (Robert Patterson)


----------------------------------------------------------------------

Message: 1
Date: Wed, 2 Feb 2022 15:38:00 -0600
From: Robert Patterson
To: "The JW Lua script plug-in."
Subject: Re: [JW Lua] Using the 'Optional' code field in RGP Lua
Message-ID:

Content-Type: text/plain; charset="utf-8"

This may also work in your script instead of the if statement. Not sure.
But if it does I'd like to know.

tacet_text = tacet_text or "TACET"



On Wed, Feb 2, 2022 at 3:21 PM Robert Patterson
wrote:

> I don't think you need a local variable at all. In your script write
>
> if tacet_text == nil then
> tacet_text = "TACET'
> end
>
> In your prefix write:
>
> tacet_text = "IT WORKS!"
>
>
> On Wed, Feb 2, 2022 at 2:02 PM Jacob Winkler
> wrote:
>
>> Hey folks, and by folks I may mean mostly Robert Patterson, can anyone
>> offer some advice on how to use the new 'Optional' field in RGP Lua? It
>> seems like the perfect place for a user to store their own custom
>> variables, but I'm having a little difficulty with it.
>>
>> In the screenshot below, you can see that I am successfully setting up my
>> 'user variable'. However, I want the script to not RELY on the presence of
>> the user variable, I want it to work no matter what. To that end, I set up
>> an if/then that tests to see if my user variable is nil. If it is not nil,
>> then the script will use its value. If it IS nil, then it will use another
>> value that I have hard coded. Seems like it should work... But it doesn't.
>>
>>
>> Any suggestions on how this could be set up better?
>>
>> -Jake
>> _______________________________________________
>> JWLua mailing list
>> JWLua at jwmusic.nu
>> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 64736 bytes
Desc: not available
URL:

------------------------------

Subject: Digest Footer

_______________________________________________
JWLua mailing list
JWLua at jwmusic.nu
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu


------------------------------

End of JWLua Digest, Vol 88, Issue 4
************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 30610 bytes
Desc: not available
URL:

------------------------------

Subject: Digest Footer

_______________________________________________
JWLua mailing list
JWLua at jwmusic.nu
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu


------------------------------

End of JWLua Digest, Vol 88, Issue 5
************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20220202/f8241b08/attachment.htm>


More information about the JWLua mailing list