Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: michel almeida on May 01, 2015, 10:50:38 PM
-
@omegaman their layouts are a maximum I'm open-mouthed and drooling
I had not seen the other
congratulations
how and the script cool.nut
You can insert messages in layout
how can I create a function has the posibility
making the read function to read an .ini file
with settings for me to call the function?
-
Michel-
Moved your post to scripting, to help with your question. I guess you're asking if there is a class to handle reading/writing to .ini files?
-
Yes that's right
read and write
-
Hi Michel,
There is a file module that you can use to open and write text files such as an ini file.
To use it in a layout or plugin script, you could do something like this:
fe.load_module( "file");
local ini_file = ReadTextFile( "file_i_want.ini" );
while ( !ini_file.eos() ) // keep going through the file until the end
{
local line = ini_file.read_line(); // gets the next line of the file
}
It can also write out a file using the WriteTextFile() class...
see: https://github.com/mickelson/attract/blob/master/config/modules/file.nut
-
thank you @raygun
I just do not intendi how to use the module
to get the result of the .ini file
to print the layout screen in pasicao x, y I want to position the result of the ini file