Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
cb21910095y@joas I think I could write a whole rant about that but ... that's for another day.
My dad doesn't know anything besides Windows. I experimented several times with Linux Ubuntu/Mint and other ones, it lacks too many things to be considered an alternative (for me). The fact that I can't handle it well enough tells me my dad will (probably) neither.
My dad's PC also runs a "cash system" software ("Kassensystem/Warenwirtschaftssystem" on google translate?π€·), which only runs on Windows.
I know you meant it as a joke, but there's no other way for me.ππ -
cb21910095y@HighTurtleDev you mean what problem I originally had or how I ended up with my solution?
-
cb21910095y@HighTurtleDev ok so the original problem was that my dad has got a food printer he uses for customers that order cakes with edible images on top. The printer for this task is not used regularly, so the ink drying up and, in worst case using the printer again with dry ink, will damage the printer permanently, which makes it unusable. Already bought a new printer because of thisπ.
The solution is to regularly let the printer run, e.g. once a week. This can be automated in Windows and that's what I tried to achieve.
Otherwise my dad wanted to keep track of the print jobs with pen and paper, which I don't believe is good idea, for several reasons one can discuss about. -
cb21910095y@nitwhiz Have a tiny bit of experience with C, never worked with C++.
Thought about C but didn't find anything really useful. Don't know whether I would consider looking into a C/C++ solution, but if you can tell me a source how to do it, I might give it a try. My python script us now 40 lines of pure code + a batch one-liner + 2 printable filesπ€· -
cb21910095y@jesustricks thanks for the idea! had it as a private repo but I guess others might benefit too, so why not...
I mean there might still be a better way to do this but I guess if people are fine with my approach, they might as well use it too. π€· -
@cb219 I don't think it has to be used, if it can, cool, but it can be educational to see what to printer controlling windows command line code looks like.
Related Rants
Well I FUCKING FINALLY managed to build a program that makes my dad's printer print automatically.
Have ranted about this on my previous rant.
My recent approach was actually overengineered all over the top. I was using pyautogui to simulate the mouse that would call the settings window on Windows, which would print a nozzle test (the translation for "Düsentestmuster" according to google?). The more I worked with it, the more I would have had to care about edge cases when calling the settings and god knows what else...π
So I left the idea.
What I came up with was a python script with some copy-pasted code of an example from the win32print api that printed an image that I specified, so it would use all inks. Somehow it works perfectly...
After that I used the win32api. ShellExecute() with ghostscript to print a PDF for the PGBK ink.
Finally a batch script to run this python script on the task scheduler. No converted .exe as dependencies and whatnot let it all go to hell.π
It's not quite what I had originally anticipated as a solution but IT FINALLY FUCKING WORKS!!
...πͺ It took way longer than expected and although I somehow couldn't manage to print all on 1 paper, I'm still satisfied that it really works.
That's all, had to vent my frustration and share this personal success.
rant
python
finally
batch
printer
automation