WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Printing Information

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Open the default printer

Keywords: 	  Open the default printer

;Opens Default printer
;
;This script needs the Control Manager and the Printer Control extenders

Run("explorer.exe","::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{2227A280-3AEA-1069-A2DE-08002B30309D}") 

AddExtender("wwprt34i.dll")
defprt = pGetDefPrtInf(1)
;Message("Default printer", defprt)


;RoboScripter
; Made with 
;   RoboScripter ver: 28
;   CtlMgr ver: 20028
AddExtender("wwctl34i.dll")

;Title: FolderView
;ID: 1
;Class: SysListView32
;Level: 3
window1=cWndByWndSpec("CabinetWClass","explorer",5,40965,9999,40961,0,0)
window2=cWndByClass(window1,`SHELLDLL_DefView`)
ControlHandle=cWndByID(window2,1)
result=cGetLVText(ControlHandle)     ;Get first column of SysListView32 text
;Message("LV Text",StrReplace(result,@tab,@crlf))     ;TODO - Remove Message.  Add code

;Figure out which item is the default printer
prtindex=ItemLocate(defprt,result,@tab)


;Title: FolderView
;ID: 1
;Class: SysListView32
;Level: 3
window1=cWndByWndSpec("CabinetWClass","explorer",5,40965,9999,40961,0,0)
window2=cWndByClass(window1,`SHELLDLL_DefView`)
ControlHandle=cWndByID(window2,1)
cDblClickItem(ControlHandle,prtindex)     ;Double-Click item in some controls




Article ID:   W15676
File Created: 2003:05:13:11:29:28
Last Updated: 2003:05:13:11:29:28