Print screen in keystroke

when i try to create print job on keystroke script is not working. There error message “name ‘event’ is not defined” . here is the my script

job = system.print.createPrintJob(event.source.parent)

Where are you monitoring your keystroke?

I’m guessing you’re using a Keystroke Client Event Script. Something like this should work for you:

window = system.gui.getWindow("Your Window").getRootContainer()

job = system.print.createPrintJob(window)
1 Like

Thanks ethomason, The print job worked.