[Tutor] Print Screen

Luke Paireepinart rabidpoobear at gmail.com
Fri Nov 3 01:10:22 CET 2006


Chris Hengge wrote:
> Awesome! Thanks again Luke
>
> How do I capture the keycode for print screen? (now I'm just curious, 
> because like I said, I've got a script that grabs all but maybe half a 
> dozen keys)
Well, how are you doing it now?
That's the important part.
>
> On 11/2/06, *Luke Paireepinart* <rabidpoobear at gmail.com 
> <mailto:rabidpoobear at gmail.com>> wrote:
>
>     Chris Hengge wrote:
>     > Because I dont know any other way to capture the screen? (In my mind
>     > using print screen would be universal) =P
>     The print screen button doesn't do anything.
>     It generates a keycode just like any other button on the keyboard.
>     Windows captures this keypress and interprets it as you wanting a
>     screenshot.
>     There is no inherent operation tied to this specific button that
>     creates
>     a screenshot.
>     So yeah, you could probably go the route of generating a printscreen
>     keypress, but
>     there are much easier ways to do that.
>     For example,
>     Install PIL,
>     then do
>     >>> import ImageGrab
>     >>> ImageGrab.grab().save('temp.jpg')
>     That's all there is to it.
>
>



More information about the Tutor mailing list