Quantcast
Channel: Questions in topic: "command line"
Viewing all articles
Browse latest Browse all 123

Get notification from command line or other application when a printer finish printng?

$
0
0
Hello! I am working on a game in which people take selfie via webcam and the photo is printed by a printer. I am using System.Diagnostics.Process to open cmd.exe and pass command into it. ("rundll32 C:\\WINDOWS\\system32\\shimgvw.dll,ImageView_PrintTo " + "\"" + (Path) + "\"" + " " + "\"" + "(Printer Name)" + "\"") This works and my printer successfully prints photo. However **I also want Unity can be able to check whether the printing is done.** After searching and trying I know I can use Prnjobs.vbs or Prncnfg.vbs to know status of printing jobs in command line. ![alt text][1] But I don't konw how to let Unity know the printing status. Maybe there is some way to save those information as a text file from cmd, and then ask Unity to read it? Or make another small WPF or Windows Form application to check the status (maybe the Win32_Printer class is what I need?) and make it talk to Unity? I will be really grateful if you can give me some advice. Thank you! *1 Win32_Printer class https://msdn.microsoft.com/en-us/library/aa394363(v=vs.85).aspx

Viewing all articles
Browse latest Browse all 123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>