Page 1 of 1

Output to txt file

Posted: Sun May 16, 2010 2:35 pm
by titanlectro
First of all, let me say thanks to everyone who worked on this project, this program is nothing short of amazing.

There has only been one thing I could not figure out. Is there a way to write information to a txt file? I'm using this Micromacro script along with a Autohotkey script that I wrote, and it would be great if I could send information from the former to the latter.

I have a hunch that this functionality is not available, but it doesn't hurt to ask.

Thanks

Re: Output to txt file

Posted: Sun May 16, 2010 4:31 pm
by Administrator
Sure can. If you just want to do it for logging purposes, you can use the logMessage() or logRaw() functions. Otherwise, you can use Lua's standard output functions. See the manual: http://www.lua.org/manual/5.1/

Code: Select all

file = io.open("somefile.txt", "w");
file:write("some text");
file:close();