[JW Lua] More Page Text Fun

Dave Foster fozder at me.com
Tue Oct 22 12:20:35 CEST 2013


Hi Jari & all,

Having a lot of fun this morning delving into the new Beta stuff - making good progress on some of my automation projects, particularly with the measure number stuff. Thanks for all of the additional settings we can now access!

I've returned to experimenting with Page Text and come up with a couple of things where I can't quite get the display to update. Firstly, I'm trying to delete all of the existing Page Text (to replace) and when I run:

local pageTexts = finale.FCPageTexts()
pageTexts:LoadAll()
for pageText in each(pageTexts) do
	pageText:DeleteData()
end

it only deletes a couple of the objects. Run again, it deletes another etc. Am I missing something either in updating the collection, or deleting in a for loop?

Secondly, if I create some text (and trying to centre in the page) using:

local newText = finale.FCPageText()
local textObject = finale.FCString()
textObject:AppendLuaString("TESTING 123")
newText:SaveNewTextBlock(textObject)
newText.HorizontalAlignment = finale.TEXTVERTALIGN_CENTER
newText:SaveNew(1)

the text appears at the left. However, when selecting the text and (in Finale itself) choosing Edit Frame Attributes, the horizontal attribute is correctly set at "Center" - and clicking OK then moves it to the centre on the page. So, it would seem to be set correctly, there's just something not updating. Any ideas?

Thanks again,

Dave





More information about the JWLua mailing list