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

page over

Status
Not open for further replies.

indswamy

Programmer
Jan 7, 2009
16
US
Hi!
this is the first time i am coming to this website.
i am writing macro grab from Attachmate to txt.
total 10 pages
first page copies whole . i did that
each page has turn another side
using pf11
that another page has only the below
.00
39.23
37.23
1.80
<<<<<<<<<<
i need only pick up 1.80 - row vary and column is fixed 10 to 13
how do i find out
plese help me. great appreciated!!
 
Hi!
i dont get response. could you help me
how do i find out 1.80 below.
thanks!
00
39.23
37.23
1.80
<<<<<<<<<<

 
Code:
Option Explicit

Declare Function Get_Line ( Sess As Object, search As String ) As String

Sub Main()
   Dim Sys As Object, Sess As Object

   Set Sys = CreateObject ( "Extra.System" )

   If Sys Is Nothing Then
      MsgBox ( "Could not create Extra.System...is E!PC installed on this machine?" )
      Exit Sub
   End If

   Set Sess = Sys.ActiveSession

   If Sess Is Nothing Then
      MsgBox ( "No session available...stopping macro playback." )
      Exit Sub
   End If

   MsgBox Get_Line ( Sess, "1.80" )
End Sub

Function Get_Line ( Sess As Object, search As String ) As String
   Dim curr_line As String, found As String, i As Integer

   found = ""

   For i = 1 To Sess.Screen.Rows
      curr_line = Sess.Screen.GetString ( i, 1, Sess.Screen.Cols )

      If InStr ( 1, UCase ( curr_line ), UCase ( search ) ) > 0 Then
         found = curr_line
         Exit For
      End If
   Next i

   Get_Line = found
End Function
 
thank you so much winblows. sorry for delay
i have still problem with this line
.00 ¦<
39.21 ¦<
37.43- ¦<
1.78 ¦<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<¦<
curr_line = Sess.Screen.GetString ( i, 1, Sess.Screen.rows)

when i checked this line it is displayd

instead of the numbers above mention


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top