Screenshot from Lua

  • Marte2007
    17th Oct 2011 Member 0 Permalink
    Is there a command in the Lua API to take a screenshot (like pressing p does)? If no, can this be added? I think it would be very useful to record screenshots/videos automatically
  • Cr15py
    17th Oct 2011 Member 0 Permalink
    I'm sure this could be done. Especially if there was a function in the API that compressed things using bzip2. Although a bitmap or a PPM could do it already, they would just be large.

    EDIT: Actually, if you can do this, you could just send the keycode to the program and fetch the screenshot?
  • Marte2007
    17th Oct 2011 Member 0 Permalink
    You mean simulate keypress? I can't do it, I was planning to send a Lua command with my Remote Toy...
  • Dingolo
    17th Oct 2011 Member 0 Permalink
    why powder toy use .ppm files?cause it can't be open with any program.
    it would be cool if it was a .bmp
  • mniip
    17th Oct 2011 Developer 0 Permalink
    it actually can be transformed to bmp
  • Marte2007
    17th Oct 2011 Member 0 Permalink
    @Dingolo (View Post)
    ImageMagick, Gimp, IrfanView and a lot of other programs can open/convert them...
    Anyway, I think PNGs would be better.
  • jarrodmaddy
    17th Oct 2011 Member 0 Permalink
    Feels like this can abused however.
  • Cr15py
    17th Oct 2011 Member 0 Permalink
    I can abuse with a while loop... you're aware that we can also use system() in Lua... which means you have command line access... which means... ya.