Question: Save stuff to file and read the infomation?

Discuss, ask for help, share ideas, give suggestions, read tutorials, and tell us about bugs you have found with MicroMacro in here.

Do not post RoM-Bot stuff here. There is a subforum for that.
Forum rules
This is a sub-forum for things specific to MicroMacro.

This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
Post Reply
Posts: 4
Joined: Sun May 01, 2016 6:27 am

Question: Save stuff to file and read the infomation?

#1 Post by ScriptKid » Sun May 01, 2016 12:43 pm

Hey Guys i have a question
i Need to save informations from one micromacro to disk (like .ini files) to read out from another micromacro
a direct com with one to the other is not solving my request the data must be readable after restart from os or other reasons

have browse the wiki but not found something usefull Information

a short example for read/write data in style of .ini/hashtable is all i Need

hope you can help me
sorry for my bad english

User avatar
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: Question: Save stuff to file and read the infomation?

#2 Post by beanybabe » Sun May 01, 2016 2:06 pm

you might look at this it is way to write some data.

User avatar
Posts: 8330
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Question: Save stuff to file and read the infomation?

#3 Post by lisa » Sun May 01, 2016 11:25 pm

well you have the file *****.lua and the info as a table.

inside the file would look like this

Code: Select all

return { "socks", "shoes", "hats"}
So the code to save it would be something like

Code: Select all

local file ="filename.lua", "w")
file:write('return { "socks", "shoes", "hats"}')
then you get the info from the file using include.

Code: Select all

tableinfo = {}
tableinfo  = include("filename.lua")

That is the most basic way I can think of for what you said you wanted.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here

Posts: 6
Joined: Fri Dec 21, 2018 12:59 pm
Location: Panama

Question Save stuff to file and read the infomation

#4 Post by WarnerDop » Mon Jan 14, 2019 3:51 pm

In the same way that Word can save an amended version of the document it has open.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest