From: Daniele Alessandri Date: 2007-03-12T20:52:25+09:00 Subject: Re: Print screen with win32api ------=_Part_15952_15181126.1173700340772 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 3/12/07, Emil Sandin wrote: mac. Since there is a "print screen"-button on the keyboard, I guess > that it should be possible to use win32api to fake a klick on the > keyboard button, and then somehow save the image to disk. Try installing Win32::Screenshot ( http://rubyforge.org/projects/win32screenshot/) and launching the following script: require 'win32screenshot' width, height, bitmap = Win32::Screenshot.desktop File.open('test.bmp', 'wb') { |file| file.write(bitmap) } You can find more examples in the test folder after installing the gem file. -- Daniele Alessandri http://www.clorophilla.net/blog/ ------=_Part_15952_15181126.1173700340772--