views:

146

answers:

2

Hi,

I need to run a ruby client that wakes up every 10 minutes, takes a screen-shot (ss) of a users screen, crops part of the (ss) out and use's OCR to check for a matching word....its basically a program to make sure remote employees are actually working by checking that they have a specific application open & the case numbers shown change.

Not sure where to even start when it comes to taking a screen-shot and cropping it, has anyone done any kind of screen capture work using Ruby?

The app will run on OSX using Ruby 1.9

Thanks!

A: 

Welcome Jason to SO.

You should be specific when asking a questions, here you are missing a lot of details...

what OS do you use? if it is an Apple OS here is a link on how to capture the screen with ruby link

Adnan
ahh your right, just edited the question to include a few more specifics.Thanks for the link, I might leave the question open just to see if there are different ways to do this.
Jason
Adnan: This should really have been a comment to the question as this is clearly *not* an answer.
Joey
No, this was in response to Adnan's response. The updates where made to the original question, no point putting bits of the question all over the page.
Jason
A: 

On OS X you can use the screencapture command in the terminal to capture the screen, so capturing the screen from Ruby shouldn't be more than

def screen_capture(path)
  `screencapture #{path}`
end
Theo
wow - ruby just gets better and better! Thanks For that.
Jason