Author Topic: You can write to a .txt or .ini file ?  (Read 1513 times)

Daniel Arcade

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
You can write to a .txt or .ini file ?
« on: September 08, 2021, 08:14:16 PM »
You can write to an .ini or .txt file via layout.nut example: hide_desktop=1 hide_desktop=0 (attract.ini)

Daimon

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: You can write to a .txt or .ini file ?
« Reply #1 on: September 09, 2021, 10:38:13 AM »
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

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: You can write to a .txt or .ini file ?
« Reply #2 on: September 10, 2021, 01:23:59 PM »
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