Variables in INI file

Is there a way to have a "dynamic" INI file so I can use %VARIABLE% instead of VALUE, for example

NEW_VAR=%VARIABLE%

 

I am using the Set Variable Action to set variable %VIEW%, then I use %VIEW% in the INI file, but the value of %VIEW% isn't put in the variables loaded from the INI file.

The errors I get are like: Can't find path M:\%VIEW%\etc... (I would expect the path to be M:\myView\etc...)

 

Does anyone have a solution for this?

 

Regards,

Magnus G

Hi Magnus,

The thing you want to do is possible. I use it too. I have a ini file and in the file i have a line like

Opl_Build_DcpOutputDir=%EMC%%Opl_Path_Extension%\output\dcp

The variables in %EMC%%Opl_Path_Extension% are always changed to the values that are set in other places or also come from the ini file. In the action to set the variable i have the option “Epand Expression” checked.

I hope this answer helps.

Hi Magnas/Richard

Only the entry name and section names are expanded… the actual values read in are not. This build has a new property to support doing just that :

https://www.finalbuilder.com/downloads/finalbuilder/620/FB620_1314.exe

Hi Richard and Vincent.

Thank you for your help and support.

I have downloaded the new version but I really don't understand what to look for. Where do I find this new property? And how do I do to make it work? Is it a new Action?

 

Regards,

Magnus

Hi Magnus

The new property is on the Read Ini Action :

readini.jpg

Ok, thank you. I was using the "Load Variables from INI" action. That's why I couldn't find it :)

Does the "Read INI File" action only read one variable at the time or could it be used to load all variables at the same time?

/Magnus