Quantcast
Channel: jruby
Viewing all articles
Browse latest Browse all 10

JRuby Toolkit Robot example - how take a screenshot of your desktop

$
0
0

JRuby Toolkit Robot example - how take a screenshot of your desktop

Here's some sample JRuby code that I just used to take a screenshot of my desktop. It uses the Toolkit and Robot classes from Java to make it all happen. It could probably be a little shorter, but I don't know much about JRuby yet. I also had a problem getting the Java File class to work properly, and referencing it as shown was the only way I could get it to work.


Viewing all articles
Browse latest Browse all 10

Trending Articles