For an art project, I want to create a simple executable file that prints a specific file (or image) every three minutes until I turn it off. I used to know some very basic programming techniques in grad school, but have long since forgotten them. Thanks for any help you can provide.
-
Could you specify a little more detail please: Confirm you mean print to a printer, not display on screen. Do you have an application in mind to do the printing? What file type? Can you tolerate the user having to click OK to a print confirmation dialog box? Why does it have to be an .exe file? You could use a MS Word macro or an application to automate mouse clicks, for instance. – user1318499 Oct 13 '19 at 23:58
-
This is way, way, way [too broad](https://stackoverflow.com/help/closed-questions) of a question. You need to at least specify a programming language, among many other details, to make this reasonably answerable. – Lance U. Matthews Oct 13 '19 at 23:59
-
I mean print a specific file to a printer. I want to click on a file that will automatically send a signal to my printer to print an image with a circle on it every few minutes. The video at https://www.dicarlojuliet.com/unentitled/ will give you a sense of how the final installation will work. It doesn't matter to me what programming language it is in. Thanks for your patience. This is an artistic request going out to the computer science community. – alison paprica Oct 14 '19 at 00:50
-
It sounds like you want someone to produce a ready-made solution for you and that's just not [how Stack Overflow works](https://stackoverflow.com/help/on-topic). This is for people facing specific problems with code they are writing. If that applies to your situation then, again, you need to set parameters (e.g. language, platform, etc.) on what you're implementing because, as is, this is just a vague guessing-game for anyone who might try to help. Otherwise, if you want a completed executable delivered you'll need to use another resource to connect you with someone to do that for free/hire. – Lance U. Matthews Oct 14 '19 at 19:41
2 Answers
Here are two ideas but a little skeletal. You may need to ask separate more specific questions once you have an overall design.
Web browser (cross platform)
One way is to use a web browser that has a local web page open.
Chrome has a kiosk-printing mode which allows web sites to do "silent print" which means no settings dialog box pops up and it can run unattended. https://help.brightpearl.com/hc/en-us/articles/360028542572-Chrome-settings-for-silent-printing
In the web page, you can use Javascript to control the printing and timing.
You may need to disable the footer showing the URL on the printout. This looks like a way: Remove header and footer from window.print()
Powershell (Windows only)
Explained in PowerShell to print pdf files automatically [1] It uses
Start-Process -FilePath “c:\docstoprint\doc1.pdf” –Verb Print -PassThru | %{sleep 10;$_} | kill
and Task Scheduler to trigger the printing at a specified time.
[1] https://gregcaporale.wordpress.com/2012/01/18/powershell-to-print-files-automatically/

- 1,327
- 11
- 33
Write an exe
file to print a file (or a so
file on linux).
Set up periodic service (if on windows) or a cronjob (if on Linux) to invoke that file.

- 3,014
- 1
- 12
- 15
-
"Write an `exe` file to print a file (or a `so` file on linux)" - That's really glossing over the whole point of the question. If someone asks "How do I frob a gidget?" then answering with "Well, first you need to frob the gidget..." isn't very useful without defining _how_. – Lance U. Matthews Oct 14 '19 at 00:03
-
@BACON ... every tech solution starts with a strategy. I provided a valid strategy. Will add in stuffs as the question evolve. Thanks. – Edward Aung Oct 14 '19 at 00:20