MotionScreenshot

Simple class for getting screenshot in a rubymotion osx application

Installation

Add this line to your application's Gemfile:

gem 'motion_screenshot'

And then execute:

$ bundle

Usage

Get the whole screen as a NSImage

MotionScreenshot::Screenshot.get

MotionScreenshot::Screenshot.get [rect] [window_id]

  • rect is used to defined the rect of the screenshot - defaults to whole screen
  • window_id is used to define the window_id of the application from which the screenshot is taken - defaults to all apps