PDA

View Full Version : Reading Config File



jedeen
03-16-2017, 09:22 AM
Hello,
I have some difficulties with starting up a compiled pascal script (the executable).
Every time I want to start a script, I first have to initiate the udp port (say 1027) in the IDE.
After that I can start the script.
I think it has to do with the fact that the generic executables from Sismo, all have a config file.
So my question is, how can I make my executable read a config file ????????
Kind regards
Jedeen

Sismo
03-17-2017, 06:05 AM
Hello Jedeen,

Please verify if the configuration file you have is a config.ini and not a config.ini.txt

You you want to use the .ini format, go to the downloads section on our website and download any script; modify this and save it with the code you want.

The function which calls config.ini is the one which is shown in the image I have attached.

http://www.mycockpit.org/forums/attachment.php?attachmentid=12167&stc=1
Another thing, the config.ini must be in the same folder as the script you are running.

Regards,

Thomas Lee, Sismo Soluciones

jedeen
03-17-2017, 08:34 AM
Hello Thomas,
are you kidding ?????:roll:
The files in your download section are only executable's !!!!! no scripts.
Can you send me a PM with that part from the script, dealing with the "ReadIniFile(........)" instruction.
I can't find anything in the help files regarding that instruction.
Thanks in advance
Regards
Jedeen

BTW: the script for the MCP and EFIS for XPlane11 is functioning.
I am now working on the mip.....

Sismo
03-20-2017, 06:05 AM
Hi Jedeen,
I have sent you an e-mail with further details.
Thomas

jedeen
03-21-2017, 10:43 AM
Thank You Thomas