cancel
Showing results for 
Search instead for 
Did you mean: 

SAPGUI scripting (or other method) screen capture

Former Member
0 Kudos

Hello,

I need a full bitmap image of SAPGUI screens for our audit department. I have been using a combination of Windows Scripting and SAPGUI Scripting. The one issue I am have is that I can't send the "Print Screen" key using the SendKeys Method in WSH. I want to paste the image directly into MS Word. (which I already can do, if I just had the image on the clipboard). Can someone tell me how I can get a SAPGUI screen shot to the clipboard programmatically? (or if someone knows a SAPGUI control code that might solve my issue also).

Thanks,

Jason Wierek

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jason,

There are 2 functions for taking screenshots available via sapgui scripting api ().

The GuiMainWindow object exposes

- HardCopy (writes hardcopy into bmp file )

- HardCopyToMemory (returns the hardcopy as memory block to caller)

A) Using that sapgui scripting api function HardCopy you can assign path and filename for your screenshot.

To load the bmp from file into word, you could try to use Words scripting API, (but I do not know whether MS exposes to Insert->Picture->FromFile function).

B) On the other hand you could try to use HardCopyToMemory from any vb script and use some API functions microsoft might provide for clipboard access.

Best regards

Jens