Print Page | Close Window

Screen Scrape

Printed From: Rocket Software
Category: AccuTerm Knowledge Base (read only)
Forum Name: Scripting & Automation
Forum Description: Customize and control AccuTerm using scripts and automation
URL: https://forum.asent.com/forum_posts.asp?TID=280
Printed Date: March 26 2026 at 5:07pm
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Screen Scrape
Posted By: paul
Subject: Screen Scrape
Date 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



Replies:
Posted By: PSchellenbach
Date 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


Posted By: PSchellenbach
Date 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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net