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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple macro gone bad

Status
Not open for further replies.

fingers21

Technical User
Mar 13, 2003
1
0
0
US
Attachmate Ver 6.4
writing a simple macro to screen scrap the current screen
The Ctrl-A Ctrtl-C recoreds fine.. when I use the Alt-keys
to work the top line menu it will not work..

Just want to copy the current screen and paste it to and existing *.txt file and print.

is this so hard?

any help tommy.lee@delta.com
 
How about something like this to capture the screen?

Sub Main()
Dim Sys As Object, Sess As Object
Dim MyScreen As Object, MyArea As Object
Dim iRow as Integer

Set Sys = CreateObject("EXTRA.System")
' Assumes an open sessions
Set Sess = Sys.ActiveSession
Set MyScreen = Sess.Screen

Open "C:Test.txt" for Append as #1
For iRow = 1 to 10
Set MyArea = MyScreen.Area(iRow,1,iRow,80)
Write #1, MyArea.Value
Next
End Sub

Alternatively, you could open for output, write the 1st line, close, open for append then execute the loop from row 2 to the last row wanted.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top