This example gets and displays the first half of the text on the first row of the screen.
Sub Main()
Dim Sys As Object, Sess As Object, MyScreen As Object
Set Sys = CreateObject("EXTRA.System")
' Assumes an open session
Set Sess = Sys.ActiveSession
Set MyScreen = Sess.Screen
' This example demonstrates using the GetString
' method to capture the first half of the first line on a
' screen.
row = 2
col = 1
halfLine = Int(MyScreen.Cols/2)
MyString$ = MyScreen.GetString(row, col, halfLine)
MsgBox "The first " + Str$(halfLine) + " characters of line " + Str$(row) + " is [" + MyString$ + "] ..."
End Sub