Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > Scripting & Automation
  New Posts New Posts RSS Feed - Screen Scrape
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedScreen Scrape

 Post Reply Post Reply
Author
Message
paul View Drop Down
Newbie
Newbie


Joined: October 14 2004
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote paul Quote  Post ReplyReply Direct Link To This Post Topic: Screen Scrape
    Posted: October 19 2004 at 3:32pm
Hi All,

My 4GL application needs to be able to “scrape” selected information from an AccuTerm screen. Does AccuTerm come with an API function that will return a section of the terminal window?

We are using AccuTerm 2000.

Thanks,
Paul
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: October 20 2004 at 7:51am
Hi Paul -

Yes - all 32 bit versions of AccuTerm have a robust object model which you can access using OLE Automation. Specifically, look at the AccuTerm.ActiveSession.GetText() function, which will return a line of text from the screen. Use this in a loop to get more than one line.

Thanks,

Pete
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: February 13 2017 at 12:56pm
Here is simple VBA script that scrapes the active session screen:

Sub Main()
    Dim app As Object
    Set app = GetObject(,"atwin32.AccuTerm")
    Dim Session As Object
    Set Session = app.ActiveSession
    If Not Session Is Nothing Then
        Dim screen As String
        Dim i As Integer
        Dim n As Integer
        n = Session.Rows
        For i = 0 To n-1
            screen = screen & Session.GetText(0,i) & vbCrLf
        Next i
        MsgBox screen
    End If
End Sub

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.