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)
job.print()

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)
job.print()
1 Like

Thanks ethomason, The print job worked.