1

I would like to get a screenshot in the clipboard as it could be obtained pressing the Prt Scr key on my keyboard. I tried things like

cat("\U2399")

or using the KeyboardSimulator package

keybd.press('/44')

but it doesn't work ! Does someone have an idea ?

Seb
  • 21
  • 2
  • I'm very interested to know this too. Based on the answers to [this](https://superuser.com/q/75614/928461) question, it may not be possible without installing some other software first. I had a quick scan of the R image magick library [manual](https://cran.r-project.org/web/packages/magick/magick.pdf) but couldn't spot anything. – stevec Aug 05 '22 at 13:44
  • With image magick installed, something like this might work `system("import -window root screen.jpeg")` (it should create a file in the root directory called 'screen.jpeg') (based on [this](https://superuser.com/a/75643/928461)) – stevec Aug 05 '22 at 13:46
  • In fact, I am looking for a solution that does not involve writing a file. – Seb Aug 08 '22 at 06:59

0 Answers0