![]() The first syntax, you supply a negative index. Inserts one or more lines into the subtitles file before the numbered line. The table indexĪppending a line does not move the cursor otherwise used to optimise sequential The latter function-call syntax is preferred for readability. line ( table) The line object table to append to the subtitles file. The third syntax supports appending multiple lines with one single operation. If the section does not exist, it will be created. Append lineĪppend one or more lines to the end of the appropriate section of the subtitlesįile. ![]() It isĪlways fast to access lines near the beginning or end of the file. Index close to the one you last accessed than to access one further away. Presents the subtitles as if it was an array, it internally maintains a cursor Random access is slow, but sequential access is fast. the first line in the file has index 1.Īegisub internally stores the subtitle file as a linked list, which means that i ( number) Index into the subtitles file of the line number to retrieve. line ( table) Table with data about the retrieved line. This retrieves the indexed line and creates a new table object with data about The first syntax is the preferred one, per normal Lua 5.1 coding style. num_lines ( number) Number of lines in the subtitle file. Note that this is not a constant-time lookup, but lua does cache the value if It cannot change spontaneously during the execution of a This number only changes by using the other operations on the This operation retrieves the total number of lines in the subtitle fileĬurrently. In all operation synopses andĮxamples, subtitles is used for name of the subtitles object being operated These operations are described in detail below. Insert line (at arbitrary position in file).The subtitles object supports the following operations: To allow the most flexibility, the subtitles object represents a complete ASSįormat file, line by line, including all meta-lines such as section headers. Points, as it makes no sense to do so at any other time. This includes for example macro validationīecause this would be outside user expectations. ![]() Is created for: Read-only Some feature functions must not be allowed to modify the subtitle file atĪll. This object is used to obtain data from and manipulate the subtitlesĪ subtitles object can have two special properties depending on the context it Most Automation 4 Lua feature functions are passed a subtitles object whenĬalled. Number of functions, and a number of table formats defined. There is one special object (the subtitles user data object) which has a This page describes the subtitle file interface use in Automation 4 Lua ![]()
0 Comments
Leave a Reply. |