WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: weissenb on February 22, 2015, 08:17:55 AM

Title: ScreenShot of a specified area
Post by: weissenb on February 22, 2015, 08:17:55 AM
Hello!
I want to make a batch making screen shots from a specified area and save the pictures with specified names.
This script only takes a whole screen:
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsrch.web+~+TechHome

Some years ago I had a script for that but i cannot find that.

Perhaps someone has a solution.

Thank you very much

Christian
Title: Re: ScreenShot of a specified area
Post by: ....IFICantBYTE on February 22, 2015, 02:50:21 PM
Hi,
in the Tech Database, do a search for "Article ID:   W15998" and that should find the routine you used to have and were looking for.
Title: Re: ScreenShot of a specified area
Post by: td on February 23, 2015, 06:47:06 AM
It could be updated to use the newer DllStruct* functions but here is  link the article mentioned by IFIcanByte

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/How~To+Save~Screen~to~a~BMP~File.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/How~To+Save~Screen~to~a~BMP~File.txt)

Title: Re: ScreenShot of a specified area
Post by: snowsnowsnow on February 25, 2015, 09:15:14 PM
My sense is that the essence  of this thread is that there are two possible general approaches to the problem of getting a "ScreenShot of a specified area":

1) You could take a screenshot of the whole screen, then use functions in the Pixie Extender to crop the result down to the area that you are interested in.

or

2) You could use some magic to only get the area you are interested in (before doing the snapshot).

I have used method 1 in my work.  I don't know if method 2 exists or is possible.  Is it?
Title: Re: ScreenShot of a specified area
Post by: td on February 26, 2015, 06:44:46 AM
Quote from: snowsnowsnow on February 25, 2015, 09:15:14 PM
My sense is that the essence  of this thread is that there are two possible general approaches to the problem of getting a "ScreenShot of a specified area":

1) You could take a screenshot of the whole screen, then use functions in the Pixie Extender to crop the result down to the area that you are interested in.

The Pixie extender is deprecated because it is buggy and because you can access the same functionality by using ImageMagic as a COM server. The Tech Database has an example

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/ImageMagick+ImageMagick~Wrapper~Function.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/ImageMagick+ImageMagick~Wrapper~Function.txt)


Quote
or

2) You could use some magic to only get the area you are interested in (before doing the snapshot).
...

If I remember correctly, the article first mentioned by  IFICantBYTE shows how to grab a specific area of the desktop and convert it to a bmp file using GDI functions via DllCall.
Title: Re: ScreenShot of a specified area
Post by: weissenb on March 01, 2015, 04:50:58 AM
Thank You very much for your help!
Christian