User Tools

Site Tools


jwlua:development

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
jwlua:development [2015/02/09 13:39]
jariw [eachentrysaved()]
jwlua:development [2015/04/17 09:59] (current)
jariw [The 'finenv' namespace]
Line 51: Line 51:
 | finenv.UI() ​   | Returns the global "user interface"​ object (of the FCUI class). The FCUI class contains Finale and system-global tasks, such as displaying alert boxes, sounding a system beep, or getting the width of the screen, etc. |  | finenv.UI() ​   | Returns the global "user interface"​ object (of the FCUI class). The FCUI class contains Finale and system-global tasks, such as displaying alert boxes, sounding a system beep, or getting the width of the screen, etc. | 
 | finenv.UserValueInput() ​ | Creates and returns a dialog object to be used for [[jwlua:​uservalueinput|simple user input]]. | | finenv.UserValueInput() ​ | Creates and returns a dialog object to be used for [[jwlua:​uservalueinput|simple user input]]. |
 +| finenv.StartNewUndoBlock() | Ends the currently active Undo/Redo block in Finale and starts a new one with a new undo text. First parameter (a Lua string) is the name of the new Undo/Redo block. Second parameter (optional, default is ''​true''​) is a boolean, indicating if the edits in the previous Undo/Redo block should be stored (=true) or cancelled (=false). Finale will only store Undo/Redo blocks that contains edit changes to the documents. Available in beta 0.36 and above. |
 | finenv.FinaleVersion | A read-only property with the running Finale "​year"​ version, such as 2011, 2012, etc. | | finenv.FinaleVersion | A read-only property with the running Finale "​year"​ version, such as 2011, 2012, etc. |
 | finenv.RawFinaleVersion | A read-only property with the full Finale version number. It's constructed as 4 bytes with different version info. The highest byte is the major version, the next is subversion, etc. Use this only if you need the revision number of a specific major Finale version. | | finenv.RawFinaleVersion | A read-only property with the full Finale version number. It's constructed as 4 bytes with different version info. The highest byte is the major version, the next is subversion, etc. Use this only if you need the revision number of a specific major Finale version. |
Line 189: Line 190:
 allpages:​LoadAll() allpages:​LoadAll()
 for v in each(allpages) do for v in each(allpages) do
 +     print ("​Page",​ v.ItemNo, "has the width",​ v.Width)
 +end</​code>​
 +
 +==== eachbackwards() ====
 +
 +''​eachbackwards()''​ does the same as the ''​each()''​ iterator, but parses the elements backwards starting from the end of the collection. It feeds the ''​for''​ loop with all the elements of the collection. This iterator is available in beta version 0.31 and later.
 +
 +<code lua>-- Print the widths for all the pages, starting from the last page
 +allpages = finale.FCPages()
 +allpages:​LoadAll()
 +for v in eachbackwards(allpages) do
      print ("​Page",​ v.ItemNo, "has the width",​ v.Width)      print ("​Page",​ v.ItemNo, "has the width",​ v.Width)
 end</​code>​ end</​code>​
jwlua/development.1423489188.txt.gz ยท Last modified: 2015/02/09 13:39 by jariw