Archive: Screenshot Plugin?


Screenshot Plugin?
is there a plugin that lets nsis create a screenshot?


I'm pretty sure there isn't one... But why would you want to do that?


Well, now there is... :)

I've just created a NSIS plugin that can save screenshots. It supports taking full-screen screenshots and screenshots of the NSIS window (but I think it has to be visible for this). Check it out:

http://home.studenten.net/~wowleon/nsScreenshot.zip

I've included an NSI-file that should explain how it works.


Great!


But even though I created it, why would anyone want to use it? Why take a screenshot during install? :igor:

For me it was just practicing writing NSIS plugins, but I'm really interested in why anyone would use it...


Doesn't anybody like it? No response from official NSIS developers?


can this plugin also detect the size of the made screenshot?


can one capture any other windows but the installer window?


killahbite: You can get the size of the file.

lzandman: I've added your plug-in to the archive download section (http://nsis.sourceforge.net/archive/download.php). Please create an archive page for your plug-in. If possible, also try reduce the size of your plug-in.


i'm asking cause i don't see it in this plugins notexistent documentation :P

i'd like to capture the avs window (avswnd), but this plugin seems only to capture fullscreen or nsis installer window.


I don't think this plug-in supports it. You can ask the author to add this feature.


Thanx for all the comments. I've read them and changed nsScreenshot a little. I've removed the NSIS-window-capture function and replaced it by a more generic function that takes a window handle and captures that window. Just use the FindWindow function to get the window handle of a window and supply it to my plugin. To capture the NSIS window you can use $HWNDPARENT.

I've also reduced the plugin's size by removing some unused resources that Delphi stuffed in the DLL. And I've also compressed it using UPX. It's now 65 kB, which is still large but not as much as it used to be. Creating small code using Delphi is still a big problem...

For more information about nsScreenshot look at the archive page that I've just created :)

Killahbite: I don't think it is necessary for me to add support for file size to the plugin. There are other ways to determine this. Just search the forums for a way to get the file size.


Please link to http://nsis.sourceforge.net/archive/...Screenshot.zip

I will update that file today.


Originally posted by Joost Verburg
Please link to http://nsis.sourceforge.net/archive/...Screenshot.zip

I will update that file today.
I've added that URL as a alternative to my own server, because it currently still holds the previous version.

By the way: I've named my plugin "nsScreenshot". You named the ZIP-file "Screenshot.zip" (without the 'ns'-prefix). Was that a mistake or don't you like the prefix? I'd rather you name it "nsScreenshot.zip", because that's more consistent. So could you please change it? :D

P.S. Joost, ben jij een Nederlander?

Originally posted by lzandman
I don't think it is necessary for me to add support for file size to the plugin. There are other ways to determine this. Just search the forums for a way to get the file size.
i was speaking of the image size (width x height), not filesize.

i tried capturing the window of the winamp plugin avs (handle is avswnd). i get an error when i do so.


Originally posted by killahbite
i tried capturing the window of the winamp plugin avs (handle is avswnd). i get an error when i do so.
I can't test the AVS plugin here myself, but there are two things that might explain the error:I hope this helps you solve your problem :)

BTW.: I could put the image dimensions onto the stack, but unfortunately I can't FTP from here. So you have to wait a couple of hours for a new version of nsScreenshot to arrive :rolleyes:

I've put the updated version online. It now includes support for returning image dimensions (width and height). When nsScreenshot returns "ok" (only then!) it has put two additional values onto the stack. Those values are the width and height of the captured image.

Currently you can only download it here, because the ZIP-file on the NSIS server isn't updated.

Question for Joost or Kichik: can I upload the latest version of my plugin to the NSIS archive server myself or do I have to signal you to update it?


Originally posted by lzandman
Question for Joost or Kichik: can I upload the latest version of my plugin to the NSIS archive server myself or do I have to signal you to update it?
Not yet I'm afraid. We do want to enable it eventually but can't find the time to update the Archive.

Updated file on NSIS archive server.


Originally posted by Joost Verburg
Updated file on NSIS archive server.
Thanx :)