AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Printer Job Status

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
superbem



Joined: 30 Jul 2007
Posts: 20

PostPosted: Thu Nov 15, 2007 12:27 pm    Post subject: Printer Job Status Reply with quote

How to get the job status of a printer with autohotkey?

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+Newsletter~Archives+News~2005.06~Jun~-~Printer~Tips~and~Tricks.txt

I check here with great dll functions, but I can't find how to get job status.
Back to top
View user's profile Send private message
garry



Joined: 19 Apr 2005
Posts: 1033
Location: switzerland

PostPosted: Thu Nov 15, 2007 3:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
superbem



Joined: 30 Jul 2007
Posts: 20

PostPosted: Thu Nov 15, 2007 3:54 pm    Post subject: Reply with quote

How is that code in autohotkey?
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Thu Nov 15, 2007 10:25 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Guest






PostPosted: Fri Nov 16, 2007 1:29 am    Post subject: Reply with quote

Thanks I know its vb, question is the functions.
GetObject() to autohotkey for instance?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group