Hi there. Please I need your help. I am a novice in macros, but with the manual (on line help) I developed a few macros that I run when using Attachmate Extra! v 4.3. Our company don't want to use in the future Attachmate, that's why we don't have the latest version. We use Extra 4.3 and 6.3. My problem is that some functions from 4.3 are not supported anymore in 6.3 and next (like GetFieldLength, GetStringFromField, SearchSession (option 4, from bottom up). Please anybody have replacement code for those functions?
Here is a simple macro in 4.3 that I can't make it work in 6.3
'The file which contains constants for the EXTRA! functions:
'$Include: "extra!.ebh"
' MACRO NAME..."DUPLICATE" copies the info from the field above (protected or unprotected)
Sub Main
'
' Connect to a terminal session. Refer to extra!.ebh for more information on GetFirstSession()
'
SessID$ = GetFirstSession()
If SessID$ = "" Then
MsgBox "No session available. Macro playback cancelled."
Exit Sub
End If
rc% = ConnectSession(SessID)
If rc% <> 1 and rc% <> 5 Then
MsgBox "Failed to connect to session " + SessID$ +" Macro playback cancelled."
rc% = ResetSystem()
Exit Sub
End If
'
' Recorded macro code:
'
' The SettleTime% parameter is used by the function WaitHostQuiet
' to control the amount of time the system waits for the X() on
' the OIA line to be absent. In this case, the default is set to
' 2000 milliseconds (2 seconds).
SettleTime% = 2
Pos% = GetCursorLocation()
Row% = RowColumn(pos%,0)-1
Col% = RowColumn(pos%,1)
rc% = GetFieldPosition(Row%,Col%,0)
Buffer$ = string$(GetFieldLength(row%,col%,0)," ")
rc% = GetStringFromField(RowColumn (rc%,0), RowColumn (rc%,1),Buffer$, Len(Buffer$)) 'copies info from the field above the cursor
rc% = SendHostKeys(Buffer$)
'
' Reset the EXTRA! system
'
rc% = ResetSystem()
End Sub
Please I will appreciate any help. Thank you
Vera
Here is a simple macro in 4.3 that I can't make it work in 6.3
'The file which contains constants for the EXTRA! functions:
'$Include: "extra!.ebh"
' MACRO NAME..."DUPLICATE" copies the info from the field above (protected or unprotected)
Sub Main
'
' Connect to a terminal session. Refer to extra!.ebh for more information on GetFirstSession()
'
SessID$ = GetFirstSession()
If SessID$ = "" Then
MsgBox "No session available. Macro playback cancelled."
Exit Sub
End If
rc% = ConnectSession(SessID)
If rc% <> 1 and rc% <> 5 Then
MsgBox "Failed to connect to session " + SessID$ +" Macro playback cancelled."
rc% = ResetSystem()
Exit Sub
End If
'
' Recorded macro code:
'
' The SettleTime% parameter is used by the function WaitHostQuiet
' to control the amount of time the system waits for the X() on
' the OIA line to be absent. In this case, the default is set to
' 2000 milliseconds (2 seconds).
SettleTime% = 2
Pos% = GetCursorLocation()
Row% = RowColumn(pos%,0)-1
Col% = RowColumn(pos%,1)
rc% = GetFieldPosition(Row%,Col%,0)
Buffer$ = string$(GetFieldLength(row%,col%,0)," ")
rc% = GetStringFromField(RowColumn (rc%,0), RowColumn (rc%,1),Buffer$, Len(Buffer$)) 'copies info from the field above the cursor
rc% = SendHostKeys(Buffer$)
'
' Reset the EXTRA! system
'
rc% = ResetSystem()
End Sub
Please I will appreciate any help. Thank you
Vera