This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Save all screenshots from Screen History in Reflections V17

Currently, 

I have a lot of scripts that run from excel in order to scrape data from TSYS. Is there a way to access the screenshots from the screen history? 

I am using GetObject("RIBM") in order to control the emulator, but currently stuck on what I should use. I have seen folks using:

    screenImage = ThisIbmTerminal.Productivity.ScreenHistory.GetLiveScreenImage()

But the above does not work as I am running the macros within excel and not within the emulator. Can someone help please?

Thank you,

Labels:

Reflection
  • 0  

    Hi William,

    If a session object exists, I would expect the same VBA commands to work whether or not you are executing the code from the emulator.  In case you don't already have it here is the reference material for the ScreenHistory Object.  If you want to share your full code(without any identifying information), what you are trying to do with it, and what the actual result is, I may be able to help you more.

    Regards,

    Jeff B

  • 0 in reply to   

    Thank you so much. I looked through the object library in the editor in vba and I still cannot find anything with: 

    ThisIbmTerminal.Productivity.ScreenHistory

    As an example I would like to do something similar to what you posted above.

    Technically I should be able to do something like this:

    GetObject("RIBM").Productivity.ScreenHistory

    But that does not work. I am using Reflection for IBM 17.0 Object Library

  • 0

    I am having the same issue. Within Excel, I set up an Extra system object (to be backwards compatible with code developed using Attachmate Extra) as follows:

    Set exSys = CreateObject("extra.system")
    Set exSess = exSys.Sessions
    Set FMS = exSess(1)

    I can then scrape data from the screen with code like "FMS.screen.GetString(4, 2, 79)" but I want to be able to grab a bitmap image of the entire screen. Variations of 

    FMS.Productivity.ScreenHistory.GetLiveScreenImage()
    FMS.Screen.Productivity.ScreenHistory.GetLiveScreenImage()
    FMS.ScreenHistory.GetLiveScreenImage()
    FMS.Screen.ScreenHistory.GetLiveScreenImage()

    have all bombed with the error message, "Object doesn't support this property or method."

    Any help would be appreciated. Thanks.

  • Suggested Answer

    0   in reply to 

    Hi Jonathan, 

    I don't think you can do this using the Extra! API, you will need to add a routine to get the NextGen Reflection API once you have the relevant terminal object, then you can grab a bitmap using ScreenHistory object.

    e.g.
    Sub WriteCurrentScreenToBitMap()
         Dim fnum As Integer
         fnum = FreeFile()
         Open "c:\temp\Screen.bmp" For Binary As #fnum
         Put #fnum, 1, ThisIbmTerminal.Productivity.ScreenHistory.GetLiveScreenImage
         Close fnum
    End Sub

    Tom