Instead of using any third-party application, I would like to write an application in Ruby that, when called, will capture the entire screen and save it in c: \ screenshot \ snap000001.png
The graphics package is easily accessible, but how can you capture an area from full screen to save it?
This program should be called with some hotkey, for example, when it is launched by pressing CTRL-PrtScn or CTRL-CTRL (both controls are left and right) or ALT-ALT.
source share