Adding frames around text blocks globally
Moderators: Peter Thomsen, miker
-
- Posts: 125
- Joined: Fri Jan 27, 2017 2:38 pm
- Finale Version: Finale 25X
- Operating System: Mac
I want to put frames around text blocks for a narrator to differentiate between his dialogue and the dialogue of the singers. I know how to do it with the Standard Frame in Text but is there a way it can be done globally so I don't have to put in the numbers every time? I have Finale 25 on High Sierra. Thanks!
Capricorn
Capricorn
This can be done by this JWLua script:Capricorn wrote:I want to put frames around text blocks for a narrator to differentiate between his dialogue and the dialogue of the singers. I know how to do it with the Standard Frame in Text but is there a way it can be done globally so I don't have to put in the numbers every time?
Code: Select all
pagetexts = finale.FCPageTexts()
pagetexts:LoadAll()
for pagetext in each(pagetexts) do
local str = pagetext:CreateTextString()
local textblock = pagetext:CreateTextBlock()
textblock:SetShowBorders( true )
textblock.LineInset = 200
textblock.LineWidth = 100
textblock:Save()
end
Harald
Finale 3.0-25.5, German edition, Windows 7
trombonist, pianist, conductor / Recklinghausen, Germany
trombonist, pianist, conductor / Recklinghausen, Germany
How exactly does this work? What is the procedure?
Select something? all? in a Finale document and then run the script file?
I made an .ahk file, but when I open it, it lists a number of errors on various lines and then exits, without any action.
Select something? all? in a Finale document and then run the script file?
I made an .ahk file, but when I open it, it lists a number of errors on various lines and then exits, without any action.
Finale 3.7 > 27.4.1, GPO5, ASUS laptop, 18.4'' display, Intel Core i7, 32GB RAM, WIN 10 Pro, Cubase
It's a JWLua file, just click the link to JWLua above.mmike wrote:How exactly does this work? What is the procedure?
Select something? all? in a Finale document and then run the script file?
I made an .ahk file, but when I open it, it lists a number of errors on various lines and then exits, without any action.
JWLua is a script language for Finale. The JWLua plug-in has to be installed first, then you can run scripts in that language inside this plug-in.
Finale 3.0-25.5, German edition, Windows 7
trombonist, pianist, conductor / Recklinghausen, Germany
trombonist, pianist, conductor / Recklinghausen, Germany
Sorry, wasn't paying attention ... since I use one of your AutoHotkey scripts a lot I just assumed it was an .ahk file.
However, I am not particularly adept at using LuaScrupts.
I pasted your script into a text editor and saved it as textframes.lua and put it into the Finale Lua folder.
Then I followed these instructions: "Open the JWLua plugin, select the "Manager" tab. There you can manage the appearance of JWLua scripts in Finale's plugin menu. In the window "Plug-In Groups" select [Menu], then near the window below "Items in Group:" click the "New..." button. In the opening file selection dialog, select the "textframes.lua" file. Click "Close" and restart Finale as requested. Then the script should appear in Finale's plugin menu much like every other plugin."
However, nothing happens. I assumed if I had a number of text frames without borders that it would then place borders around all of them. I select the frames themselves first, or also a staff or measures, but it doesn't work. Where am I going wrong?
However, I am not particularly adept at using LuaScrupts.
I pasted your script into a text editor and saved it as textframes.lua and put it into the Finale Lua folder.
Then I followed these instructions: "Open the JWLua plugin, select the "Manager" tab. There you can manage the appearance of JWLua scripts in Finale's plugin menu. In the window "Plug-In Groups" select [Menu], then near the window below "Items in Group:" click the "New..." button. In the opening file selection dialog, select the "textframes.lua" file. Click "Close" and restart Finale as requested. Then the script should appear in Finale's plugin menu much like every other plugin."
However, nothing happens. I assumed if I had a number of text frames without borders that it would then place borders around all of them. I select the frames themselves first, or also a staff or measures, but it doesn't work. Where am I going wrong?
Finale 3.7 > 27.4.1, GPO5, ASUS laptop, 18.4'' display, Intel Core i7, 32GB RAM, WIN 10 Pro, Cubase
Mmike - just open the JWLua window and select the "Development" tab. Does that work? If yes, paste my script in there. A Finale file with at least one page text block must be open to have any effect. Hit "Run Script". All page text blocks should get frames.
The "Management" tab and the other parts of the JWLua window are just for fancier stuff like running scripts via hotkeys, sending parameters and the like. For just running a simple script, the "Development" tab is sufficent.
The "Management" tab and the other parts of the JWLua window are just for fancier stuff like running scripts via hotkeys, sending parameters and the like. For just running a simple script, the "Development" tab is sufficent.
Finale 3.0-25.5, German edition, Windows 7
trombonist, pianist, conductor / Recklinghausen, Germany
trombonist, pianist, conductor / Recklinghausen, Germany
Thanks, that works (however only with page attached text blocks, is that correct?)
All my text blocks would be created when working in scroll view in the process of entering a composition. If I want to create borders I would still have to do it indvidually as I am creating each text block or, then in page view, change each one to page attached......
Could you change the script so that it would work in scroll view?
More questions -
How and where in the Lua window can I change the name of the script?
I also tried to edit it, but failed - what numbers to use for a little more space around (left and right, not top and bottom) and for a thicker border? Where/how edit and save?
All my text blocks would be created when working in scroll view in the process of entering a composition. If I want to create borders I would still have to do it indvidually as I am creating each text block or, then in page view, change each one to page attached......
Could you change the script so that it would work in scroll view?
More questions -
How and where in the Lua window can I change the name of the script?
I also tried to edit it, but failed - what numbers to use for a little more space around (left and right, not top and bottom) and for a thicker border? Where/how edit and save?
Last edited by mmike on Mon Apr 15, 2019 3:25 pm, edited 1 time in total.
Finale 3.7 > 27.4.1, GPO5, ASUS laptop, 18.4'' display, Intel Core i7, 32GB RAM, WIN 10 Pro, Cubase
-
- Posts: 125
- Joined: Fri Jan 27, 2017 2:38 pm
- Finale Version: Finale 25X
- Operating System: Mac
This is all pretty complicated. I was just hoping Finale had something that would work globally already in the program like in Utilities (Change) or Document preferences. I ended up doing each text block individually.
Yes, correct. I understood the original poster's question in that way.mmike wrote:Thanks, that works (however only with page attached text blocks, is that correct?)
Texts entered in scroll view are of type "FCCellTexts". For a quick-and-dirty version, change the first line pagetexts = finale.FCPageTexts() to this one: pagetexts = finale.FCCellTexts(). For better coding, the variable names would have to be adapted, but for the functionality, this isn't of any importance.mmike wrote:Could you change the script so that it would work in scroll view?
Select "Save..." in the upper drop-down-menu and give it an appropriate name.mmike wrote:How and where in the Lua window can I change the name of the script?
Edit it in the development text field, save as described above. For more space and thicker lines, change the two numbers 200 and 100 to larger ones.mmike wrote:I also tried to edit it, but failed - what numbers to use for a little more space around (left and right, not top and bottom) and for a thicker border? Where/how edit and save?
Finale 3.0-25.5, German edition, Windows 7
trombonist, pianist, conductor / Recklinghausen, Germany
trombonist, pianist, conductor / Recklinghausen, Germany
That doesn't seem to work. The script fails to run and a red dot appears on line 1change the first line pagetexts = finale.FCPageTexts() to this one: pagetexts = finale.FCCellTexts()
Finale 3.7 > 27.4.1, GPO5, ASUS laptop, 18.4'' display, Intel Core i7, 32GB RAM, WIN 10 Pro, Cubase
Well, what's the error message below then? Do you have a Finale file open with measure-attached text blocks?mmike wrote:That doesn't seem to work. The script fails to run and a red dot appears on line 1
Finale 3.0-25.5, German edition, Windows 7
trombonist, pianist, conductor / Recklinghausen, Germany
trombonist, pianist, conductor / Recklinghausen, Germany
Obviously, you're using Finale 2014.5. Possibly, you have a 32/64 bit issue, make sure you installed the correct JWLua version for your system. It's also possible that FCCellTexts isn't supported in the older versions (motet, that's a "C" too much). It's in the doc, and it's working on my system.
Finale 3.0-25.5, German edition, Windows 7
trombonist, pianist, conductor / Recklinghausen, Germany
trombonist, pianist, conductor / Recklinghausen, Germany
Looks like I have Lua v0_45. My Finale version is 32-bit. Where, if available, do I find the correct Lua download? (cant find it on JW's site...)make sure you installed the correct JWLua version for your system
Indeed FCCellTexts doesn't appear in the Class Documentation
Finale 3.7 > 27.4.1, GPO5, ASUS laptop, 18.4'' display, Intel Core i7, 32GB RAM, WIN 10 Pro, Cubase
- motet
- Posts: 8329
- Joined: Tue Dec 06, 2016 8:33 pm
- Finale Version: 2014.5,2011,2005,27
- Operating System: Windows
Must just be missing from the 32-bit version (latest is 0.54 from September 2017).
How do you determine the version number of a JW plug-in, anyway? JW Lua is missing from the (now-broken) JW Plug-In Tool Manager.
How do you determine the version number of a JW plug-in, anyway? JW Lua is missing from the (now-broken) JW Plug-In Tool Manager.
- michelp
- Posts: 2064
- Joined: Fri Jul 25, 2003 3:35 pm
- Finale Version: 27.4.1,26.3.1, Mont.
- Operating System: Mac
Michel
MacOsX 12.7.5, Finale 27.4.1 & 26.3.1, Mac Mini Intel Dual Core i7 3Ghz, 16 Go Ram. Azerty kb. MOTU Midi Express XT USB, Roland Sound Canvas SC-88vl, MOTU Audio Express. 2 monitors (27"' pivot, 24'"), JW Lua, RGP Lua
MacOsX 12.7.5, Finale 27.4.1 & 26.3.1, Mac Mini Intel Dual Core i7 3Ghz, 16 Go Ram. Azerty kb. MOTU Midi Express XT USB, Roland Sound Canvas SC-88vl, MOTU Audio Express. 2 monitors (27"' pivot, 24'"), JW Lua, RGP Lua
- michelp
- Posts: 2064
- Joined: Fri Jul 25, 2003 3:35 pm
- Finale Version: 27.4.1,26.3.1, Mont.
- Operating System: Mac
I wasn't really answering you, but on the Mac, it seems that the only way is to locate the file jwlua64.bundle; its Infos window shows the version number.
Michel
MacOsX 12.7.5, Finale 27.4.1 & 26.3.1, Mac Mini Intel Dual Core i7 3Ghz, 16 Go Ram. Azerty kb. MOTU Midi Express XT USB, Roland Sound Canvas SC-88vl, MOTU Audio Express. 2 monitors (27"' pivot, 24'"), JW Lua, RGP Lua
MacOsX 12.7.5, Finale 27.4.1 & 26.3.1, Mac Mini Intel Dual Core i7 3Ghz, 16 Go Ram. Azerty kb. MOTU Midi Express XT USB, Roland Sound Canvas SC-88vl, MOTU Audio Express. 2 monitors (27"' pivot, 24'"), JW Lua, RGP Lua
- motet
- Posts: 8329
- Joined: Tue Dec 06, 2016 8:33 pm
- Finale Version: 2014.5,2011,2005,27
- Operating System: Windows
Thanks. The Windows version does not have such a wrapper, alas. The version string doesn't seem to appear anywhere in the .fxt file:
Yet somehow JW Plug-in Manager knows (knew?) what version the other plug-ins are (or were). JW Lua is not included for some reason (because it's beta?).$ strings jwlua.fxt | grep '0\.54'
$
The following JWLua code should give Finale's version and the JWLua plug-in's version:
Which, in my case, returns:
Code: Select all
print("Finale Version: ",finenv.FinaleVersion)
print ("JWLua Plug-in Version: ",finenv.StringVersion)
Code: Select all
Running [Unnamed Script] ======>
Finale Version: 2025
JWLua Plug-in Version: 0.54
<======= [Unnamed Script] succeeded (Processing time: 0.000 s).
Finale 3.0-25.5, German edition, Windows 7
trombonist, pianist, conductor / Recklinghausen, Germany
trombonist, pianist, conductor / Recklinghausen, Germany
This is what I have:
Running [Unnamed Script] ======>
Finale Version: 2014
JWLua Plug-in Version: 0.45
<======= [Unnamed Script] succeeded (Processing time: 0.000 s).
However ... I have removed that plug-in and downloaded and presumably installed the latest version 0.54, but it doesn't show in Finale. It still says 0.45. I put the Luafolder into the Finale LuaScripts folder. Isn't this where it should be?
Running [Unnamed Script] ======>
Finale Version: 2014
JWLua Plug-in Version: 0.45
<======= [Unnamed Script] succeeded (Processing time: 0.000 s).
However ... I have removed that plug-in and downloaded and presumably installed the latest version 0.54, but it doesn't show in Finale. It still says 0.45. I put the Luafolder into the Finale LuaScripts folder. Isn't this where it should be?
Finale 3.7 > 27.4.1, GPO5, ASUS laptop, 18.4'' display, Intel Core i7, 32GB RAM, WIN 10 Pro, Cubase
Finale 2014 was a 32bit program. Lua 0.45 obviously as well. If this Lua version doesn't contain the FCCellText class (which it obviously does not), there's no way you can get it to work on your system.mmike wrote:This is what I have:
Finale Version: 2014
JWLua Plug-in Version: 0.45
JWLua 0.54 does indeed support this class, but it needs a 64bit version of Finale, thus meaning Finale 25 and above.
Finale 3.0-25.5, German edition, Windows 7
trombonist, pianist, conductor / Recklinghausen, Germany
trombonist, pianist, conductor / Recklinghausen, Germany