[JW Lua] Hello World
Jari Williamsson
jari.williamsson at mailbox.swipnet.se
Tue Oct 15 19:05:03 CEST 2013
Dave and all,
Here's another version that changes all page text blocks to Arial Black,
24 point:
-- pageText is the PageText object,
-- thisText is the raw string
for pageText in loadall(finale.FCPageTexts()) do
local thisText = pageText:CreateTextString()
-- Process ALL elements in the raw string
local enigmaStrings = thisText:CreateEnigmaStrings(true)
for enigmaString in each(enigmaStrings) do
if enigmaString:StartsWith("^size(") then
enigmaString.LuaString = "^size(24)"
end
if enigmaString:StartsWith("^font(") then
enigmaString.LuaString = "^font(Arial Black)"
end
end
-- Recreate the raw string based on the collection components
thisText = enigmaStrings:CreateString(nil)
pageText:SaveTextBlock(thisText)
end
Best regards,
Jari Williamsson
More information about the JWLua
mailing list