Home > Articles > IncludeIniFile function in RoutineBot

IncludeIniFile function in RoutineBot

June 18th, 2009

Syntax

IncludeIniFile( FileName:String )

Parameters

FileName:String

Full path to file with params

Return value

If file exists function return 1, otherwise function return 0.

Remarks

With function IncludeIniFile you can read some parameters from file. Parameters must be represent in format <key>=<value>. E.g. after including file, with content
a=1
s=some text

you become in scrtipt 2 variables : a:integer with value 2 and s:string with value ’some text’.

Example

For these example you must create text file with content
i=1
s=Hello world!

(or download it from here)
and save it as ‘c:\sometext.txt’.

IncludeIniFile('c:\sometext.txt');
MSGBox('i = ' + ToString(i));
MSGBox('s = ' + s);

Download example IncludeIniFile.

  • Share/Bookmark

Developer Articles

  1. No comments yet.
  1. No trackbacks yet.