Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

screen capture

Status
Not open for further replies.

jetted

Programmer
Joined
Sep 13, 1999
Messages
5
Location
CA
Hi everyone

This is doing the trick for small file on the mainframe but itis taken a long time for larger file, can someone propose a better to capture screen shot. I know about captur32.ebm but it is only for one screen shot.

Code:
        Mynbtest = Sess0.Screen.GetString(1,76,5)
        Mynbpf8=mynbtest/19
        Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
        Sess0.Screen.Sendkeys("<HOME>")
        Sess0.Screen.Sendkeys("m <pf7>")
        for j=1 to mynbpf8
            for i =6 to 24
            take_line= Sess0.Screen.Area(i, 5, i, 80)
            Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
            write #3, take_line
            Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
            next i
        Sess0.Screen.Sendkeys("<pf8>")
        Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
        next j
Thanks
 
Ok I have solve my problem, and will share my finding. The trick was not to read one line at a time it was to capture the entire screen ( take_line= Sess0.Screen.Area(6, 5, 24, 80))and then move down to the subsquent page copy and paste the entire screen into a word document


Code:
 dim mynbtest as integer
       dim mynbpf8 as integer 
       close #3
       kill "c:\endevor.doc"
       Open "c:\endevor.doc" for append as #3
logoff =""

'Do until logoff = "Bottom"
        Mynbtest = Sess0.Screen.GetString(1,76,5)
        Mynbpf8=mynbtest/19
        Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
        Sess0.Screen.Sendkeys("<HOME>")
        Sess0.Screen.Sendkeys("m <pf7>")
        for j=1 to mynbpf8
            take_line= Sess0.Screen.Area(6, 5, 24, 80)
            Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
            write #3, take_line
            Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
            
        Sess0.Screen.Sendkeys("<pf8>")
        'Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
        next j    

'loop	

close #3
End Sub
 
jetted,

You can save a bit more time by taking out

Code:
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

after

Code:
take_line= Sess0.Screen.Area(6, 5, 24, 80)

My experience has been that you don't need a WaitHostQuiet statement after any method that doesn't change the screen (e.g. GetString, PutString, Search, Area). You just need it after you send a function key or <ENTER>, or something else that moves your session to a new screen.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top