Here is what I have so far.
Some problems are:
1.Clipboard not cleared before macro started
2.Snapshot of complete line that may contain __ at the end
3.If line is blank skip it
Thank you for your help.
-----------------------------------------------------------
'--------------------------------------------------------------------------------
' This macro was created by the Macro Recorder.
' Session Document: "ADMIN.EDP"
' Date: Thursday, July 27, 2006 12:26:09
' User: brydavis
'--------------------------------------------------------------------------------
' Global variable declarations
Global g_HostSettleTime%
Global g_szPassword$
Sub Main()
'--------------------------------------------------------------------------------
' Get the main system object
Dim Sessions As Object
Dim System As Object
Set System = CreateObject("EXTRA.System") ' Gets the system object
If (System is Nothing) Then
Msgbox "Could not create the EXTRA System object. Stopping macro playback."
STOP
End If
Set Sessions = System.Sessions
If (Sessions is Nothing) Then
Msgbox "Could not create the Sessions collection object. Stopping macro playback."
STOP
End If
'--------------------------------------------------------------------------------
' Set the default wait timeout value
g_HostSettleTime = 3000 ' milliseconds
OldSystemTimeout& = System.TimeoutValue
If (g_HostSettleTime > OldSystemTimeout) Then
System.TimeoutValue = g_HostSettleTime
End If
' Get the necessary Session Object
Dim Sess0 As Object
SessName0$ = "ADMIN.EDP"
Set Sess0 = Sessions.Item(SessName0$)
If Sess0 is Nothing Then
Err = MsgBox(SessName0 + " is not currently open. Open it?",1)
If 1 = Err Then
Err = 0
Set Sess0 = Sessions.Open(SessName0)
If Err Then
MsgBox("Failed to open " + SessName0 + ". Stopping playback")
Stop
End If
ElseIf 2 = Err Then
Stop
Else
MsgBox("Failed to open " + SessName0 + ". Stopping playback")
Stop
End If
End If
If Not Sess0.Visible Then Sess0.Visible = TRUE
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
' This section of code contains the recorded events
' Selecting the text at specific Row 8 Column 14 through Row 8 Column 18
' Example: Sess0.Screen.Select 8, 14, 8, 18
' Last Name
Sess0.Screen.Select 7, 15, 7, 37
' Copy and append it to clipboard
Sess0.Screen.CopyAppend
' First Name
Sess0.Screen.Select 9, 15, 9, 37
Sess0.Screen.CopyAppend
' Address 1
' Address 2
' City
' State
' Zip
System.TimeoutValue = OldSystemTimeout
End Sub