Attract-Mode Support > Scripting

You can write to a .txt or .ini file ?

(1/1)

Daniel Arcade:
You can write to an .ini or .txt file via layout.nut example: hide_desktop=1 hide_desktop=0 (attract.ini)

Daimon:
Please be more specific, what do you want to accomplish?
Yes you can read- or write to files.
Use the functions 'ReadTextFile(fn)' or 'WriteTextFile(fn)' from the 'file.nut' module.
alternatively you can experiment with fe.nv

https://github.com/mickelson/attract/blob/master/Layouts.md#nv

https://github.com/mickelson/attract/blob/master/Layouts.md#overview

Daniel Arcade:
I want to put an option on the layout for it to write 1 or 0 on this line "hide_desktop=1" which is in a file called attract.ini

Navigation

[0] Message Index

Go to full version