| View previous topic :: View next topic |
| Author |
Message |
superbem
Joined: 30 Jul 2007 Posts: 20
|
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 1033 Location: switzerland
|
Posted: Thu Nov 15, 2007 3:50 pm Post subject: |
|
|
found that in link above, but I don't know how to use it
| Quote: | Here is some code that gets the status of a print job (assuming there is one).
strComputer = "."
objWMIService = GetObject(StrCat("winmgmts:\\" , strComputer , "\root\cimv2"))
colPrinters = objWMIService.ExecQuery("Select * from Win32_PrintJob")
list = ""
ForEach objPrinter In colPrinters
list = StrCat(list, objPrinter.JobId, " | ", objPrinter.JobStatus, @TAB)
Next
AskItemlist("Printer Job Status",StrTrim(list), @TAB, @UNSORTED, @SINGLE)
colPrinters = 0
objWMIService = 0
Exit |
|
|
| Back to top |
|
 |
superbem
Joined: 30 Jul 2007 Posts: 20
|
Posted: Thu Nov 15, 2007 3:54 pm Post subject: |
|
|
| How is that code in autohotkey? |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6772 Location: Pacific Northwest, US
|
Posted: Thu Nov 15, 2007 10:25 pm Post subject: |
|
|
that is VB, you will have to translate. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Nov 16, 2007 1:29 am Post subject: |
|
|
Thanks I know its vb, question is the functions.
GetObject() to autohotkey for instance? |
|
| Back to top |
|
 |
|