Hi,
can someone point me to a DLL (-function) or even commandline tool which enables me to make a screenshot of the desktop from code? Even if there is something which can do screenshots of "any window" (via specifying the windows HWND), that would be fine.
I just need a way to do this from REXX. (Oh, yes: For OS/2 and eComStation I mean. :-P )
TIA,
Thomas
Hi Thomas,
Have you looked at Gotcha it's GPL
A working C code is in Sullivan: OS/2 Presentation Manager for Masters (or something like that :) ), the section dealing with programming PM hooks. If you only want a DLL entry and not a hook, the code sould be much simpler. You get a bitmap of the captured window.
Hi ivan,
Quote from: ivan on 2011.07.04, 14:46:05
Have you looked at Gotcha it's GPL
I checked the descripition at Hobbes (Don't have eCS around for test-drive).
Hm. Sounds just like what I need :-P
Thanks for the tip! Will check it out later.
Cheers,
Thomas
Hi Radek,
Quote from: Radek on 2011.07.04, 15:30:43
A working C code ... [snip]
I will try if I can make something out of it, but I am C-agnostic. :-P
Even if I manage to get a working C-program from a source snippet ("by chance"), I would not be able to use that as a Rexx-callable DLL ... well OK; maybe a standalone thing. But still, there are a lot of "maybe" in this equation. :-)
Thanks a lot anyway!
(I still like your avatar very much though! :-P )
Cheers,
Thomas
Quote from: warpcafe on 2011.07.04, 12:40:27
Hi,
can someone point me to a DLL (-function) or even commandline tool which enables me to make a screenshot of the desktop from code? Even if there is something which can do screenshots of "any window" (via specifying the windows HWND), that would be fine.
I just need a way to do this from REXX. (Oh, yes: For OS/2 and eComStation I mean. :-P )
TIA,
Thomas
There is the APM Automation Tool in the IBM OS/2 Employee Written Software Catalog. It is APMTST.ZIP and it does just what you want and more. From the inf file:
APMT is a program package that provides a set of REXX functions. These functions can be used to write REXX programs which can drive any PMapplication running in the same PC or in a different PC. Some of the functions query the state of the PM window controls, while others change them. This allows the REXX program (hereinafter called APMT client) to act in place of a human operator.
There is a.o. a SAVE_IMAGE function in there to save as selected window into a bmp file.
Wimpie.
Hi all,
thanks for the great suggestions so far!
In the meanwhile, I had a moment of true *headdesk* experience when recalling that there is a website known by the name of "Hobbes"... OUCH! And it has a whole damn directory of such things! *double-ouch* !! :)
FYI: @hobbes - /pub/os2/apps/graphics/scrncapt :D
Thanks again!
Thomas
Stop damaging that desk Thomas, it doesn't deserve it ;)
ivan
Quote from: ivan on 2011.07.05, 19:21:44
Stop damaging that desk Thomas, it doesn't deserve it ;)
ivan
Hehe. ;)
You don't want to see all the scratches from my teeth and fingernails that originated when I was last programming something! :-/
Cheers,
Thomas
I cannot recall for sure, but I think earlier versions of PMView were REXX callable/scriptable. Also, GBM may be suitable either as a back end or incorporated. There was, at one time, a REXX wrapper DLL to access much of it's functions. Grabbing screenshots shouldn't be difficult either way, and many of the GPI tutorials showed how to do similar...