Page 1 of 1 1
Topic Options
#192556 - 2009-02-26 11:41 AM Access to the print queue
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
Hi, I wonder if it is possible to give my Teaching staff access to the print queue on our Windows 2003 print server using kixtart. I just want to really allow them to connect to the share on the print server and launch the print queue via Kix...
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#192561 - 2009-02-26 01:31 PM Re: Access to the print queue [Re: Stephen Wintle]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
uhm.

you want the kix to launch the queye window or you want to code kix to show list of the queye on console, or?
_________________________
!

download KiXnet

Top
#192574 - 2009-02-26 03:18 PM Re: Access to the print queue [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4572
Loc: USA
Maybe this will do what you are looking for:

SharedPrinterList() - Creates a List of Printer Shares, Local or Remote PCs
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=184529#Post184529
_________________________
(... better days ahead)

Top
#192584 - 2009-02-26 05:07 PM Re: Access to the print queue [Re: Allen]
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
I want colleagues to be able to clear the print queues and delete jobs etc. So I suppose yes I want kix to launch the Queue Window. If you can point me in the right direction I will be most grateful.
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#192588 - 2009-02-26 05:32 PM Re: Access to the print queue [Re: Stephen Wintle]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Hi Stephen Whintle

Want to purge the Print Que on a network printer?
This script was writen to function on a network with shared printers.

The user will need admin rights.
It uses Active Directory and WMI.

You will need to install KiXforms.NET

 Code:
;region Setup Variables 
$Title = "Purge Print Que..." 
$BuildVer = '1.0.2.2' 
$Version = " Build($BuildVer)" 

$objRootDSE = GetObject("LDAP://rootDSE") 
$defaultNamingContext = $objRootDSE.Get("defaultNamingContext") 

Break On 
$System = CreateObject("Kixforms.System") 
If Not $System 
   $nul= MessageBox("KiXforms.Net Not Initiated. This Script Will Now Close.","Error",16) 
   Quit() 
EndIf 
$nul = $System.Application.EnableVisualStyles 

$SysVer = $System.ProductVersion 
$MinSysVer = "3.1.29.0" 
If $SysVer < $MinSysVer 
   $nul= MessageBox("KiXforms.Net Version Installed ("+$SysVer+")."+@CRLF+"The Minimum Version that must be Installed is ("+$MinSysVer+"). "+@CRLF+"This Script Will Now Close.","Error",16) 
   Quit() 
EndIf 
;endregion 

;region Main Form 
$Form = $System.Form() 
$Form.StartPosition = 1 ;FormStartPosition_CenterScreen 
$Form.Size = $System.Size(775,453) ;(Width,Height) 
$Form.Text = $Title+$Version 
$Form.Icon = $System.Icon.FromBitmap(FormIcon())

$MainPanel = $System.Panel() 
$MainPanel.Dock = 5 ;Fill 
$nul = $Form.Controls.Add($MainPanel) 

;region MainMenu 
$MainMenu = $System.MainMenu() 

$File = $MainMenu.MenuItems.Add($System.MenuItem("File")) 

$Exit = $File.MenuItems.Add($System.MenuItem("Exit")) 
$Exit.Click = "ExitForm()" 

$Tools = $MainMenu.MenuItems.Add($System.MenuItem("Tools")) 

$Refresh = $Tools.MenuItems.Add($System.MenuItem("Refresh")) 
$Refresh.Click = "SearchForPrinters()" 

$Form.Menu = $MainMenu 
;endregion 

$ListView = $System.ListView() 
$ListView.CheckBoxes = -1 ;True 
$ListView.Dock = 5 ;Fill 
$ListView.FullRowSelect = -1 ;True 
$ListView.View = $System.View_Details 
$nul = $MainPanel.Controls.Add($ListView) 

$Column0= $ListView.Columns.Add($System.ColumnHeader("Document Name",100,$System.HorizontalAlignment_Left)) 
$Column1= $ListView.Columns.Add($System.ColumnHeader("Status",60,$System.HorizontalAlignment_Left)) 
$Column2= $ListView.Columns.Add($System.ColumnHeader("Owner",60,$System.HorizontalAlignment_Left)) 
$Column3= $ListView.Columns.Add($System.ColumnHeader("Pages",50,$System.HorizontalAlignment_Left)) 
$Column4= $ListView.Columns.Add($System.ColumnHeader("Size",60,$System.HorizontalAlignment_Left)) 
$Column5= $ListView.Columns.Add($System.ColumnHeader("Submitted",120,$System.HorizontalAlignment_Left)) 

$RightPanel = $System.Panel() 
$RightPanel.Dock = 4 ;Right 
$nul = $MainPanel.Controls.Add($RightPanel) 

$Splitter = $System.Splitter() 
$nul = $MainPanel.Controls.Add($Splitter) 

$ListBox = $System.ListBox() 
$ListBox.Click = "EnablePurge()" 
$ListBox.Dock = 3 ;Left 
$ListBox.Sorted = -1 ;True
$ListBox.Width = 213
$nul = $MainPanel.Controls.Add($ListBox) 

;region StatusBar 
$StatusBar = $System.StatusBar() 
$StatusBar.Text = "" 
$nul = $MainPanel.Controls.Add($StatusBar) 

$ProgressBar = $System.ProgressBar() 
$ProgressBar.Left = $StatusBar.Width-$ProgressBar.Width-20
$ProgressBar.Top = 3
$ProgressBar.Height = $StatusBar.Height-4
$ProgressBar.Visible = 0
$nul = $StatusBar.Controls.Add($ProgressBar) 
;endregion 

$Cancel = $System.Button() 
$Cancel.Click = "CancelPurge()" 
$Cancel.DialogResult = 2 ;Cancel 
$Cancel.FlatStyle = 3 ;System 
$Cancel.Left = 10
$Cancel.Text = "Cancel" 
$Cancel.Top = 10
$nul = $RightPanel.Controls.Add($Cancel) 

$SelectAll = $System.Button() 
$SelectAll.Click = "SelectAll()" 
$SelectAll.Enabled = 0
$SelectAll.FlatStyle = 3 ;System 
$SelectAll.Left = 10
$SelectAll.Text = "Select All" 
$SelectAll.Top = $Cancel.Bottom+10
$nul = $RightPanel.Controls.Add($SelectAll) 

$Purge = $System.Button() 
$Purge.Click = "PurgePrintQue()" 
$Purge.Enabled = 0
$Purge.FlatStyle = 3 ;System 
$Purge.Left = 10
$Purge.Text = "Purge" 
$Purge.Top = $SelectAll.Bottom+10
$nul = $RightPanel.Controls.Add($Purge) 

$RightPanel.Width = $Purge.Width+20

$Form.AcceptButton = $Purge 
$Form.CancelButton = $Cancel 
$Form.Show  ;Displays the Form 

SearchForPrinters() 

While $Form.Visible 
   $Nul = Execute($Form.DoEvents()) 
Loop 
Exit 0
;endregion 

Function ExitForm() 
   Quit() 
EndFunction 

Function AdvanceProgressBar($Step,Optional $Text) 
    
   $Count = $Count+$Step 
   If $Count > 100
      $Count = 0
   EndIf 
   $StatusBar.Text = $Text 
   $ProgressBar.Value = $Count 
   Sleep 0.05
    
EndFunction 

Function SearchForPrinters() 
    
   $ProgressBar.Visible = -1
   $ListBox.Items.Clear 
   If $Purge.Enabled = -1
      $Purge.Enabled = 0
      $SelectAll.Enabled = 0
   EndIf 
    
   $ADS_SCOPE_SUBTREE = 2
   $objConnection = CreateObject("ADODB.Connection") 
   $objCommand = CreateObject("ADODB.Command") 
   $objConnection.Provider = "ADsDSOObject" 
   $objConnection.Open("Active Directory Provider") 
   $objCommand.ActiveConnection = $objConnection 
   $objCommand.CommandText = "Select url from 'LDAP://$defaultNamingContext' where objectClass='printQueue' " 
   $objCommand.Properties("Page Size",1000) 
   $objCommand.Properties("Searchscope",$ADS_SCOPE_SUBTREE) 
   $objRecordSet = $objCommand.Execute 
   $objRecordSet.MoveFirst 
   Do 
      $url = $objRecordSet.Fields("url").Value 
      For Each $Item in $url 
         $Period = InStr($Item,".") 
         If $Period > 0
            $Array1= Split($Item,"//") 
            $Array2= Split($Array1[1],".") 
            $ServerName = $Array2[0] 
            $Array3= Split($Array2[2],"/") 
            $ShareName = $Array3[1] 
            $PrinterShareName = "\\"+$ServerName+"\"+$ShareName 
            AdvanceProgressBar(10,$PrinterShareName) 
            $ListItem = $ListBox.Items.Add($PrinterShareName) 
         EndIf 
      Next 
      $objRecordSet.MoveNext 
   Until $objRecordSet.EOF 
    
   ;Object cleanup 
   $objConnection = 0
   $objCommand = 0
   $objRecordSet = 0
    
   $Count = 0
   AdvanceProgressBar(0,"") 
   $ProgressBar.Visible = 0
    
EndFunction 

Function EnablePurge() 
    
   $Item = $ListBox.SelectedItem 
   If $Item 
      GetPrintQue() 
   EndIf 
    
EndFunction 

Function CancelPurge() 
    
   $ListBox.SetSelected(0,0) 
   $ListView.Items.Clear 
   If $Purge.Enabled = -1
      $Purge.Enabled = 0
      $SelectAll.Enabled = 0
   EndIf 
    
EndFunction 

Function PurgePrintQue() 
    
   $Index = 0
   $Item = $ListBox.SelectedItem 
   $Array = Split($Item,"\") 
    
   $strComputer = $Array[2] 
   $PrinterName = $Array[3] 
    
   $objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"+$strComputer+"\root\cimv2") 
   $objPrinter = $objWMIService.ExecQuery("Select * from Win32_Printer") 
   For Each $objPrinterName in $objPrinter 
      If $objPrinterName.ShareName = $ShareName 
         $PrinterName = $objPrinterName.Name 
      EndIf 
   Next 
    
   $objPrintJobs = $objWMIService.ExecQuery("Select * from Win32_PrintJob",,48) 
   For Each $objPrintJob in $objPrintJobs 
      $objName = $objPrintJob.Name 
      $Array = Split($objName,",") 
      $PName = $Array[0] 
      If $PName = $PrinterName 
         $Item = $ListView.Items.Item($Index) 
         If $Item.Checked; = -1 ;True 
            $objPrintJob.Delete_ 
         EndIf 
         $Index = $Index+1
      EndIf 
   Next 
    
   $ListView.Items.Clear 
   $ListBox.SetSelected(0,0) 
   If $Purge.Enabled = -1
      $Purge.Enabled = 0
      $SelectAll.Enabled = 0
   EndIf 
    
EndFunction 

Function GetPrintQue() 

   $ListView.Items.Clear 
   $Item = $ListBox.SelectedItem 
   $Array = Split($Item,"\") 
    
   $strComputer = $Array[2] 
   $ShareName = $Array[3] 
    
   $objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"+$strComputer+"\root\cimv2") 
   If Not (@ERROR = 0) 
     $nul = MessageBox("Error connecting to the remote computer '"+$strComputer+"' SError# "+@SERROR+" Error#"+@ERROR, "Error", 16) 
     Quit @SERROR 
   EndIf 
   $objPrinter = $objWMIService.ExecQuery("Select * from Win32_Printer") 
   For Each $objPrinterName in $objPrinter 
      If $objPrinterName.ShareName = $ShareName 
         $PrinterName = $objPrinterName.Name 
      EndIf 
   Next 
    
   $objPrintJobs = $objWMIService.ExecQuery("Select * from Win32_PrintJob",,48) 
   For Each $objPrintJob in $objPrintJobs 
      $objName = $objPrintJob.Name 
      $Array = Split($objName,",") 
      $PName = $Array[0] 
      If $PName = $PrinterName 
         $Item = $ListView.Items.Add($System.ListViewItem($objPrintJob.Document)) 
         $ItemIndex = $Item.Index 
         If $objPrintJob.Status = "UNKNOWN" 
            $Item = $ListView.Items.Item($ItemIndex).SubItems.Add($System.ListViewSubItem("")) 
         Else 
            $Item = $ListView.Items.Item($ItemIndex).SubItems.Add($System.ListViewSubItem($objPrintJob.Status)) 
         EndIf 
         $Item = $ListView.Items.Item($ItemIndex).SubItems.Add($System.ListViewSubItem($objPrintJob.Owner)) 
         $Item = $ListView.Items.Item($ItemIndex).SubItems.Add($System.ListViewSubItem($objPrintJob.TotalPages)) 
         $Item = $ListView.Items.Item($ItemIndex).SubItems.Add($System.ListViewSubItem($objPrintJob.Size)) 
         $TimeSubmitted = $objPrintJob.TimeSubmitted 
         $year = SubStr($TimeSubmitted,1,4) 
         $month = SubStr($TimeSubmitted,5,2) 
         $day = SubStr($TimeSubmitted,7,2) 
         $hour = SubStr($TimeSubmitted,9,2) 
         $min = SubStr($TimeSubmitted,11,2) 
         $sec = SubStr($TimeSubmitted,13,2) 
         $Submitted = $hour+":"+$min+":"+$sec+" "+$month+"/"+$day+"/"+$year 
         $Item = $ListView.Items.Item($ItemIndex).SubItems.Add($System.ListViewSubItem($Submitted)) 
      EndIf 
   Next 
   If $ListView.Items.Count > 0
      $Purge.Enabled = -1
      $SelectAll.Enabled = -1
   Else 
      $Purge.Enabled = 0
      $SelectAll.Enabled = 0
   EndIf 
    
EndFunction 

Function SelectAll() 
    
   For Each $Item in $ListView.Items 
      $Item.Checked = -1 ;True 
   Next 
    
EndFunction

Function FormIcon()
  $FormIcon = "
  Qk02EAAAAAAAADYAAAAoAAAAIAAAACAAAAABACAAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA
  8drQ/8NWKP/DVij/w1Yo/7Y/Df+9RBH/u0US/7tFEv+7RRL/uUUU/7lFFP+5RBL/vEUT/7xF
  E/+9RhP/vkUQ/75FEP/ARQ3/wUUK/8FFCv/DRAj/wEEG/8BBBv/APwP/wD8D/8A/A//DPwH/
  vjsA/7lOH/+5Th//uU4f/+3Yz//fXij/308T/99PE//fTxP/31Ub/+JaIf/hXCX/4Vwl/+Fc
  Jf/gXSb/4F0m/+FcJP/iXiP/4l4j/+JeIf/iXh7/4l4e/+VfG//lXhb/5V4W/+ZdE//lWw7/
  5VsO/+ZYCf/mWAn/5lgJ/+ZUBP/iTgH/00UA/9NFAP/TRQD/uE4f/99eKP/fTxP/308T/99P
  E//fVRv/4loh/+FcJf/hXCX/4Vwl/+BdJv/gXSb/4Vwk/+JeI//iXiP/4l4h/+JeHv/iXh7/
  5V8b/+VeFv/lXhb/5l0T/+VbDv/lWw7/5lgJ/+ZYCf/mWAn/5lQE/+JOAf/TRQD/00UA/9NF
  AP+4Th//314o/99PE//fTxP/308T/99VG//iWiH/4Vwl/+FcJf/hXCX/4F0m/+BdJv/hXCT/
  4l4j/+JeI//iXiH/4l4e/+JeHv/lXxv/5V4W/+VeFv/mXRP/5VsO/+VbDv/mWAn/5lgJ/+ZY
  Cf/mVAT/4k4B/9NFAP/TRQD/00UA/7hOH//tUA7/71sc/+9bHP/vWxz/8GMo//BoL//xazP/
  8Wsz//FrM//xbDT///////JsMf/ybTH/8m0x//JvLv/ycCr/8nAq//NwJf/zbx//828f////
  ///0ahP/9GoT//RmDf/0Zg3/9GYN//NgB//wWgL/4k0A/+JNAP/iTQD/uToA//NWFP/0YiX/
  9GIl//RiJf/0azH/9HE5//V0Pf/1dD3/9XQ9//////////////////V2Of/1djn/9Xc3//Z4
  Mv/2eDL/93gs//d3Jf/////////////////3chn/+G4R//huEf/4bhH/92gL//RgBf/mUwL/
  5lMC/+ZTAv++PQH/81kY//RoLv/0aC7/9Ggu//RxOv/1d0L/9XpG//V6Rv////////////Z6
  Rf////////////Z8Qf/2fT3/9n04//Z9OP/3fTL////////////4eiT////////////4cxX/
  +HMV//hzFf/4bA7/9GMJ/+dWBf/nVgX/51YF/78/Av/zWRj/9Ggu//RoLv/0aC7/9HE6//V3
  Qv/1ekb////////////2ekX/9npF//Z7Q/////////////Z9Pf/2fTj/9n04////////////
  +Hwq//h6JP/4dx3////////////4cxX/+HMV//hsDv/0Ywn/51YF/+dWBf/nVgX/vz8C//NZ
  GP/0aC7/9Ggu//RoLv/0cTr/9XdC////////////9XpG//Z6Rf/2ekX/9ntD//Z8Qf//////
  //////Z9OP////////////h8Kv/4fCr/+Hok//h3Hf/4dx3////////////4cxX/+GwO//Rj
  Cf/nVgX/51YF/+dWBf+/PwL/810e//RuNv/0bjb/9G42//V2Qv////////////aBTv/2gU7/
  935K//d+Sv/2fkj/9n9F//Z/Rf/////////////////3fzX/930t//d9Lf/4eiX/+Hce//h3
  Hv/4cxf////////////3bRH/9GYN/+dZC//nWQv/51kL/8BBBv/zXR7/9G42//RuNv/0bjb/
  ///////////2gU7/9oFO//aBTv/3fkr/935K//Z+SP/2f0X/9n9F//aAQf//////9n87//d/
  Nf/3fS3/930t//h6Jf/4dx7/+Hce//hzF//4cxf////////////0Zg3/51kL/+dZC//nWQv/
  wEEG//NiJf/0cz3/9HM9////////////9oBO//aBTv/2gU7/9oFO//aBTv/2gU7/9oBL//Z/
  R//2f0f/9n9C//Z/PP/2fzz/9382//d8Lf/3fC3/+Hkm//d3IP/3dyD/93MZ//dzGf/3cxn/
  ///////////oXRD/6F0Q/+hdEP+/RAr/9GYr//V4RP/1eET/9XhE////////////9oNT//aD
  U//2g1P/9oJR//aCUf/3gU3/9n9I//Z/SP/2f0P/9n49//Z+Pf/2fDX/93ot//d6Lf/3dyb/
  93Qh//d0If/3cRv/93Eb////////////9GoY/+dfFv/nXxb/518W/8BHD//0Ziv/9XhE//V4
  RP/1eET/9n9O////////////9oNT//aDU//2glH/9oJR//eBTf/2f0j/9n9I//Z/Q//2fj3/
  9n49//Z8Nf/3ei3/93ot//d3Jv/3dCH/93Qh//dxG/////////////duGP/0ahj/518W/+df
  Fv/nXxb/wEcP//RrMv/1fUv/9X1L//V9S//2g1T/94RW////////////94NV//aCUv/2glL/
  9oBN//Z9SP/2fUj/9nxC//Z6PP/2ejz/9ng0//Z2Lf/2di3/93Mm//dxIf/3cSH/////////
  ///2bxz/9m0c//RqHP/mYRz/5mEc/+ZhHP+/SBL/9G43//aBUf/2gVH/9oFR//eFV//3hln/
  94VX////////////9oFS//aBUv/2fk3/9ntH//Z7R//2eUH/9Xc7//V3O//1dDT/9nIs//Zy
  LP/2byb/9m0i////////////9mse//ZrHv/2ah//82oh/+ZiIf/mYiH/5mIh/75JFv/0bjf/
  9oFR//aBUf/2gVH/94VX//eGWf/3hVf/94VX////////////9oFS//Z+Tf/2e0f/9ntH//Z5
  Qf/1dzv/9Xc7//V0NP/2ciz/9nIs//ZvJv////////////ZrHv/2ax7/9mse//ZqH//zaiH/
  5mIh/+ZiIf/mYiH/vkkW//RyPP/2h1n/9odZ//aHWf/3il3/94ld//eGWf////////////aB
  U//2gVP/9n5O//V6R//1ekf/9XhB//V0Ov/1dDr/9XI0//VvLP/1byz/9Wwn//ZqI///////
  //////ZpIP/2aSD/9Wgi//JpJf/mYiX/5mIl/+ZiJf++Sxn/9XlG//eMYP/3jGD/94xg//iN
  Yv/3i2D////////////3h1v/94JU//eCVP/2fE7/9nhH//Z4R//1dEH/9XE6//VxOv/0bjT/
  9Wst//VrLf/1aSj/9Wck//VnJP////////////VmIv/1ZyX/8mgp/+RjKf/kYyn/5GMp/71L
  G//1eUb/94xg//eMYP/3jGD/+I1i////////////94db//eHW//3glT/94JU//Z8Tv/2eEf/
  9nhH//V0Qf/1cTr/9XE6//RuNP/1ay3/9Wst//VpKP/1ZyT/9Wck//VmIv////////////Vn
  Jf/yaCn/5GMp/+RjKf/kYyn/vUsb//V5Rv/4kmj/+JJo//iSaP////////////eJXv/3iV7/
  94le//eDV//3g1f/9n5Q//Z5Sv/2eUr/9XVD//VxPf/1cT3/9G42//VrL//1ay//9Wkr//Vn
  KP/1Zyj/9WYn//VmJ/////////////JpLP/kYir/5GIq/+RiKv+9TBz/9n5N//iXbv/4l27/
  ///////////4k2r/+Ixi//iMYv/4jGL/94Zb//eGW//3gFT/9ntN//Z7Tf/2d0f/9XJA//Vy
  QP/1bzr/9G00//RtNP/0azD/9Gkt//RpLf/1aSz/9Wks//VpLP///////////+VjLP/lYyz/
  5WMs/7xMHf/2fk3/+Jdu//iXbv/4l27////////////4jGL/+Ixi//iMYv/3hlv/94Zb//eA
  VP/2e03/9ntN//Z3R///////9XJA//VvOv/0bTT/9G00//RrMP/0aS3/9Gkt//VpLP/1aSz/
  ///////////yaS7/5WMs/+VjLP/lYyz/vEwd//aCUv/4n3n/+J95//ifef/4oXz/////////
  ///4kWf/+JFn//eLYP/3i2D/94VZ//aBU//2gVP/////////////////9XNB//RvOv/0bzr/"+
  "9G44//RsNP/0bDT/9Gwy////////////9Gsx//FpMP/kYiz/5GIs/+RiLP+8TB3/9oJS//If"+
  "ef/4n3n/+J95//ihfP/4mXH////////////4kWf/94tg//eLYP/3hVn/9oFT////////////
  9XdG////////////9G86//RvOv/0bjj/9Gw0//RsNP////////////RsMv/0azH/8Wkw/+Ri
  LP/kYiz/5GIs/7xMHf/2glL/+J95//ifef/4n3n/+KF8//iZcf/4kWf////////////3i2D/
  94tg//eFWf////////////Z7Tf/1d0b/9XdG////////////9G86//RuOP/0bDT/////////
  ///0bDL/9Gwy//RrMf/xaTD/5GIs/+RiLP/kYiz/vEwd//aGWP/5qon/+aqJ//mqif/5rY3/
  +KN///iZcf/4mXH////////////4k2r////////////3il7/94ZZ//aCVP/2glT/9oBR////
  ////////9XxK////////////9XU///V1P//1dT//9HI6//JsNP/jYSr/42Eq/+NhKv+7SBj/
  95Bl//m0l//5tJf/+bSX//q3mv/5qon/+KB6//igev/4oHr/////////////////+JJo//iS
  aP/3j2X/945i//eOYv/3jWH/94pd//////////////////aDUv/2fkz/9n5M//Z+TP/1d0P/
  8m43/+NfKP/jXyj/418o/7lGFf/4nHb/+a+Q//mvkP/5r5D/+bKU//inhf/4nHX/+Jx1//ic
  df/4l27///////eSaP/3kGb/95Bm//eOYv/3jF//94xf//eLXv/2iFn/9ohZ///////2glD/
  9oJQ//V8Sf/1fEn/9XxJ//V1P//yazL/41wj/+NcI//jXCP/xVww//icdv/5r5D/+a+Q//mv
  kP/5spT/+KeF//icdf/4nHX/+Jx1//iXbv/4l27/95Jo//eQZv/3kGb/945i//eMX//3jF//
  94te//aIWf/2iFn/9oVW//aCUP/2glD/9XxJ//V8Sf/1fEn/9XU///JrMv/jXCP/41wj/+Nc
  I//FXDD/+Jx2//mvkP/5r5D/+a+Q//mylP/4p4X/+Jx1//icdf/4nHX/+Jdu//iXbv/3kmj/
  95Bm//eQZv/3jmL/94xf//eMX//3i17/9ohZ//aIWf/2hVb/9oJQ//aCUP/1fEn/9XxJ//V8
  Sf/1dT//8msy/+NcI//jXCP/41wj/8VcMP/95dz/+Jpz//iac//4mnP/94xg//aEVf/2fk3/
  9n5N//Z+Tf/1ekj/9XpI//V2Qv/1eET/9XhE//VzPv/1cz7/9XM+//VxO//1cTv/9XE7//Rs
  M//0bDP/9Gwz//RqMP/0ajD/9Gow//RkKP/vXR//4Gc0/+BnNP/gZzT/8tvS/w=="
  $FormIcon = $System.Bitmap.FromBase64String($FormIcon)
EndFunction




Here is the same code packaged as an .exe (you will still need Install KiXforms.Net)


Attachments
Purge Print Que.zip (270 downloads)
Description:


_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#192591 - 2009-02-26 06:16 PM Re: Access to the print queue [Re: Benny69]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm, that image is quite messy. ;\)
_________________________
!

download KiXnet

Top
#192592 - 2009-02-26 06:17 PM Re: Access to the print queue [Re: Lonkero]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
yeah, didn't have a better one
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#192594 - 2009-02-26 06:39 PM Re: Access to the print queue [Re: Benny69]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok, you are forgiven.
actually, for a school, one might think the function should be altered.
nobody can print (the files are kept in queue forever) until teacher clicks on print or delete job.
that would save paper and disable the ability of after hours nasty printing.
_________________________
!

download KiXnet

Top
#192636 - 2009-02-27 12:06 PM Re: Access to the print queue [Re: Lonkero]
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
thanks for your assistance and comments, with regards to the prints being held in the queue, would the Teacher need to allow each print job discretely(separately) or would the teacher just have to allow all print jobs once?

As for printing out of hours this isn't an issue thankfully as the pupils in the school are fairly good in this respect..
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#192637 - 2009-02-27 12:49 PM Re: Access to the print queue [Re: Stephen Wintle]
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
Hi i'm getting the following error:

ERROR : array reference out of bounds!
Script: c:\printspool.kix
Line : 179

Should I be editing the script so that I specify the name of the Print server?
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 685 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.036 seconds in which 0.017 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org