Цитата Sollar:
как в поле Name: прописать функцию {code:gets|{#l}}, либо каким образом это можно обойти? »
|
Sollar, пардон за {} в имени типов/компонентов, не работает из-за двоеточия. Набросал пример, допустим ваш ini-файл
имеет следующий вид:
Код:

[org1]
ex1=1
org=ttt1
[org2]
ex2=1
org=ttt2
, лежит рядом со скриптом и называется test.ini, тогда
Код:

[Types]
#define l
#sub AddDescription
Name: {#ReadIni(SourcePath + "\test.ini", "org" + Str(l), "org")}; Description: {#ReadIni(SourcePath + "\test.ini", "org" + Str(l), "org")}
#endsub
#for {l = 1; l < 3; l++} AddDescription
[Components]
Name: n1; Description: n1; Types: {#ReadIni(SourcePath + "\test.ini", "org1", "org")}; Check: gets(ExpandConstant('{#ReadIni(SourcePath + "\test.ini", "org1", "ex1")}'))
Name: n2; Description: n2; Types: {#ReadIni(SourcePath + "\test.ini", "org2", "org")}; Check: gets(ExpandConstant('{#ReadIni(SourcePath + "\test.ini", "org2", "ex2")}'))
[code]
function gets(Param: String): Boolean;
begin
Result := Param = '1';
end;