Search the Community
Showing results for tags 'printjob'.
I'm writing code to manage print jobs. The on-line searches I did showed different ways of calling a print job method. I see these ways of calling print job methods: $oPrintjob.Delete_ (Method name followed by underline) $oPrintJob.Resume() (Method name followed by open/closed parens) $oPrintJob.Status (Method name followed by nothing at all)I don't understand syntax where the method name is followed by an underline. When is it correct to use the method name followed by an underline vs the open/closed parens vs nothing at all?
I'm trying to display information from my printer queues and I cannot figure how to convert the 'datetime' value returned in the "time submitted" item to a date and time. Here's my test code: test3() Func test3() Local $str, $objWMIService, $AllPrintJobs, $PrintJob While 1 $objWMIService = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2") $AllPrintJobs = $objWMIService.ExecQuery("SELECT * FROM Win32_PrintJob") For $PrintJob In $AllPrintJobs $str = "" $str &= "Name: " & $PrintJob.Name & @CRLF ;