I have a processing sketch that sends a String to a .txt file and then I want to be able to print the same .txt file from the processing sketch.
Any ideas on how to do this?
I’ve thought about running a .bat file from the processing sketch using open() but my shell scripting skills are non-existent.
Thanks!
On windows:
Your idea about opening a console to do the work, since this is platform stuff, seems reasonable. However, if you have a USB printer it’s tough.
Instead, I suggest you install Powershell (on Windows 7 you have it by default). The way you can print in Powershell is to get the contents of a file and shoot it to the Out-Printer (alias ‘lp’) cmdlet. Then your open call is:
N.B. I haven’t tried this in Processing, but the command line works for me.