Hi guys,
I'm new to the whole .NET thing - Not even technically a programmer. I've been tasked with converting some code from a .vbs file to a VB .net application. I've hit a slight problem. The code interacts with an AttachMate client (terminal emulator) to grab text from the screen (see vbs code below)
The problem I'm hitting is in the oSCREEN.GetString line.
I'm getting an exception which reads:
The intellisense doesn't show me GetString as an option for the oSCREEN (which is initially defined in the class being used)
Do I need to somehow extend the "Extra.System" class to make this method available, or somehow include it from somewhere? Create a new class and inherit the Extra.System bit into it? Suggestions and solutions are welcomed - the Extra help file was no use, as it clearly shows the GetString method is being used correctly..
Cheers,
Dave
"Yes, I'll stop finding bugs in the software - as soon as you stop writing bugs into the software." <-- Me
For all your testing needs: Forum1393
I'm new to the whole .NET thing - Not even technically a programmer. I've been tasked with converting some code from a .vbs file to a VB .net application. I've hit a slight problem. The code interacts with an AttachMate client (terminal emulator) to grab text from the screen (see vbs code below)
Code:
For iRow = 1 To oSCREEN.Rows
sRowText = oSCREEN.GetString(iRow, 1, oSCREEN.Cols) & vbNewLine
sRowText = Replace(sRowtext,vbNewLine,"")
If Len(iRow) = 1 Then
sRow = "0" & iRow
Else
sRow = iRow
End If
oSCREENLOG.WriteLine sRow & " --" & sRowText & "++"
If sScreenText <> "" Then
sScreenText = sScreentext & vbNewLine
End If
sScreenText = sScreenText & sRowText
Next
The problem I'm hitting is in the oSCREEN.GetString line.
I'm getting an exception which reads:
System.Runtime.InteropServices.COMException was unhandled
ErrorCode=61837
HelpLink="C:\Program Files\E!PC\EXTRA.HLP#455053"
Message="Unable to write read-only property."
Source="hà`"
The intellisense doesn't show me GetString as an option for the oSCREEN (which is initially defined in the class being used)
Code:
oEXTRA = CreateObject("EXTRA.System")
oSESSIONS = oEXTRA.Sessions
'Set oSESSION = oSESSIONS.Open("C:\Program Files\E!PC\Sessions\BACKDCMS.EDP")
If oSESSIONS.Count > 0 Then
oSESSION = oEXTRA.ActiveSession
oSCREEN = oSESSION.Screen
End If
Do I need to somehow extend the "Extra.System" class to make this method available, or somehow include it from somewhere? Create a new class and inherit the Extra.System bit into it? Suggestions and solutions are welcomed - the Extra help file was no use, as it clearly shows the GetString method is being used correctly..
Cheers,
Dave
"Yes, I'll stop finding bugs in the software - as soon as you stop writing bugs into the software." <-- Me
For all your testing needs: Forum1393