Page 1 of 1

Printing Machine

Posted: Wed Oct 17, 2018 9:44 am
by Tuxion
Hi, sorry about my bad English.

I would like to know if there is a way to program a function to use the printing machine.

Re: Printing Machine

Posted: Wed Oct 17, 2018 1:29 pm
by pgimeno
Can you explain what you mean by printing machine?

Because this is a printing machine
Image

Do you meant a typewriter effect, where the text appears letter by letter instead of all at a time?

Re: Printing Machine

Posted: Wed Oct 17, 2018 2:25 pm
by Tuxion
Sorry i don't know how to say it in english but it's look like that:

https://upload.wikimedia.org/wikipedia/ ... rinter.jpg

Re: Printing Machine

Posted: Wed Oct 17, 2018 3:36 pm
by zorg
So you want to use the printer... not sure if there's an easy solution available.

Re: Printing Machine

Posted: Wed Oct 17, 2018 4:44 pm
by Xugro
You could use another program to do the printing for you. On Windows you could use Wordpad to print by command. For this you have to save your Text-File and then use

Code: Select all

os.execute("write /p filename")
(See the Lua OS Library Tutorial for more information for os.execute().)

The advantage of using Wordpad over Notepad is Wordpads support for Rich-Text-Format (RTF). In RTF you can use bold, italics and even images (How to add images to RTF-Files with code). This should be enough to write a simple Word-Processor on Windows.

Re: Printing Machine

Posted: Wed Oct 17, 2018 6:44 pm
by pedrosgali
I was wondering what that command was in Lua, in python it's

Code: Select all

os.startfile(dir_path, "print")
I will use this in the future :awesome: