OS2 World.Com Forum
2012.05.25, 19:56:35 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: RFI: Make a screenshot (a "capture") from REXX  (Read 4234 times)
warpcafe
Global Moderator
Hero Member
*****
Posts: 746


Failure is not an option.


View Profile
« 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
Logged

"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that"
- G.H. Hardy
ivan
Hero Member
*****
Posts: 562


View Profile
« Reply #1 on: 2011.07.04, 14:46:05 »

Hi Thomas,

Have you looked at Gotcha it's GPL
« Last Edit: 2011.07.04, 14:47:42 by ivan » Logged
Radek
Full Member
***
Posts: 195



View Profile
« Reply #2 on: 2011.07.04, 15:30:43 »

A working C code is in Sullivan: OS/2 Presentation Manager for Masters (or something like that Smiley ), 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.
Logged
warpcafe
Global Moderator
Hero Member
*****
Posts: 746


Failure is not an option.


View Profile
« Reply #3 on: 2011.07.04, 16:01:07 »

Hi ivan,
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
Logged

"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that"
- G.H. Hardy
warpcafe
Global Moderator
Hero Member
*****
Posts: 746


Failure is not an option.


View Profile
« Reply #4 on: 2011.07.04, 16:16:34 »

Hi Radek,
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
Logged

"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that"
- G.H. Hardy
wimpie
Newbie
*
Posts: 16


View Profile
« Reply #5 on: 2011.07.05, 13:58:32 »

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.
Logged
warpcafe
Global Moderator
Hero Member
*****
Posts: 746


Failure is not an option.


View Profile
« Reply #6 on: 2011.07.05, 15:21:53 »

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* !! Smiley

FYI: @hobbes - /pub/os2/apps/graphics/scrncapt Cheesy

Thanks again!
Thomas
Logged

"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that"
- G.H. Hardy
ivan
Hero Member
*****
Posts: 562


View Profile
« Reply #7 on: 2011.07.05, 19:21:44 »

Stop damaging that desk Thomas, it doesn't deserve it  Wink

ivan
Logged
warpcafe
Global Moderator
Hero Member
*****
Posts: 746


Failure is not an option.


View Profile
« Reply #8 on: 2011.07.06, 15:09:10 »

Stop damaging that desk Thomas, it doesn't deserve it  Wink

ivan

Hehe. Wink
You don't want to see all the scratches from my teeth and fingernails that originated when I was last programming something! :-/

Cheers,
Thomas
Logged

"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that"
- G.H. Hardy
RobertM
Global Moderator
Hero Member
*****
Posts: 2017



View Profile WWW
« Reply #9 on: 2011.07.28, 08:23:27 »

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...
Logged

|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!