Inno Setup Preprocessor: #insert

Inno Setup Preprocessor

Inno Setup Preprocessor: #insert

Syntax

insert-directive: insert <expr>

Description

Changes the insertion point. By default, each processed line is added to the end of the translation. Using insert the point at which the next processed line will be added to the translation can be changed. insert takes an expression which must evaluate to an integer. The insertion point will be set to this integer.

The insertion point is also always automatically incremented each time after line has been added to the translation, so that each new line is inserted after the one previously inserted.

It is not recommended to use script generating functions (such as SetSetupSetting) which may insert a line by themselves, thus shifting a part of the translation one line down, whereas insertion point is not updated. This may result in different insertion point than expected.

The Find function can be used to produce values for the insert directive.

Examples

#insert FindSectionEnd("Icons")
#insert FindSection("Setup") + 1
#insert Find(0, "somefile.ext", FIND_CONTAINS)

See also

append.