| insert-directive: | insert <expr> |
Changes the insertion point. By default, each processed line is appended to the end of the preprocessor output. With insert, you can set where the next processed line is inserted. insert takes an expression that must evaluate to a 0-based line index. If this index is 0, the next processed line is inserted at the beginning of the preprocessor output. If this index is 1, the next processed line is put in the second position of the preprocessor output, and so on.
The insertion point is automatically incremented after each line is added to the preprocessor output, so each new line is inserted after the previously inserted line.
Avoid script generating functions (such as SetSetupSetting) that may insert a line themselves. This shifts part of the preprocessor output one line down without updating the insertion point. The next line may then be inserted in an unexpected place.
The Find function can be used to produce values for the insert directive.
#insert FindSectionEnd("Icons")
#insert FindSection("Setup") + 1
#insert
Find(0, "somefile.ext", FIND_CONTAINS)