AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Aegisub effects từ tệp lua4/15/2024 ![]() The fifth syntax deletes a range of lines, both indexed lines inclusive. Trying to delete a nonexistent line is an error, except for with deleterange. Supports tables which are too large to unpack and will be slightlyįaster if you have the lines in a table anyway. The fourth syntax is identical to lete(unpack(tbl)), but Indexes given must all be correct for the subtitle file’s state before any The third syntax supports deleting multiple indexed lines in one call. Will move up to fill the deleted indexes, so old indexes will no longer be Remove one or more from the subtitles file. Replacing lines with lines of a different type has undefined results, and may ![]() Replacing lines uses the list cursor and will move it. line ( table) The line object table to replace with. ![]() i ( number) The line index to replace at. Replace line #ĭelete the indexed line and insert the given line in its stead. Inserting lines uses the list cursor and will move it. line ( table) The line object table to insert into the subtitles file. Inserting lines into the wrong section of the subtitle file has undefined Such that old indexes will no longer be valid. Inserting lines will move lines after the inserted lines to move down in index, 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. Allow undo points Only macro processing functions can set undo This includes for example macro validation functions and export filter configuration panel providers,ī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
Read More
Leave a Reply. |