I know this is an old thread, but I have had the need to start monitoring print usage as it is just rediculous and a nice pop-up warnign people of this I think will help. We are using the free version of PaperCut to just monitor and report on what is being printed and where to name and shame.
The old code had a couple of problems where it would pop-up multiple times for the same print dialogue if they were slow at clicking onwards so this one waits for the print window to be closed. The problem with both the old and new code is it doe not work for office 2010 suite as they do not use the standard dialogue - any help on this would be appreciated. Anyway the new code is below:
Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=printer.ico
#AutoIt3Wrapper_outfile=PrintHelper.exe
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_Comment=A little script to sit and run in the background of all logons to prevent excessive printing within school.
#AutoIt3Wrapper_Res_Description=Prompts User if they Really Need to Print
#AutoIt3Wrapper_Res_Fileversion=1.0.1.3
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p
#AutoIt3Wrapper_Res_LegalCopyright=Alex 'Freedom' Haines
#AutoIt3Wrapper_Res_SaveSource=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; Original code taken straight from this source:
; http://www.edugeek.net/forums/how-do-you-do/33367-do-you-need-print-message.html
; Do not allow the user to pause or exit the script.
Opt("TrayMenuMode", 1)
; Start the main loop.
Do
; Wait until the print window is active.
WinWaitActive("Print", "Ready")
; Prompt the user to pay some attention to the need to print.
MsgBox(0, "Stop and Think", "Do you really need to print that?" & @CRLF & @CRLF & "Have you used print preview to make sure it looks correct?" & @CRLF & @CRLF & "Don't forget I am watching and monitoring and we will be naming and shaming abusers every month!")
; Bring the pop-up window to the front.
WinActivate("Stop and Think")
; Wait until the print window is closed (to stop multiple pop-ups at the same time).
WinWaitClose("Print", "Ready")
; End of the main loop.
; Exit the loop using 'ExitLoop' command.
Until False