Code Stage Parameter Problem

matuopm

Member
I'm trying to read some characters out of a mainframe application window.

I already got 2 functions like this working:
one for sending single keys like F1 and the other one for sending a string at certain coordinates (y=row / x=column).

Code:
Dim autECLPSObj As Object
autECLPSObj = CreateObject ("PCOMM.autECLPS")
autECLPSObj.SetConnectionByName("A")
outputstring = autECLPSObj.GetText(y,x,zeichen)

This code gives me an error:

Internal : Could not execute code stage because exception thrown by code stage: ECL37170: Ungültige Parameter. Ungültige Daten.


Code:
Dim autECLPSObj As Object
autECLPSObj = CreateObject ("PCOMM.autECLPS")
autECLPSObj.SetConnectionByName("A")
outputstring = autECLPSObj.GetText(1,2,4)

If I hardcode the values ( 1 , 2 , 4 )its working as intended and returns me a string 4 characters long from the coordinates row 1 column 2
 

Attachments

  • codestage.png
    18.6 KB · Views: 10
  • inputs.png
    24.3 KB · Views: 7
  • objectpage.png
    9.5 KB · Views: 7
  • outputs.png
    23.4 KB · Views: 6

Sachin_Kharmale

Active Member
I'm trying to read some characters out of a mainframe application window.

I already got 2 functions like this working:
one for sending single keys like F1 and the other one for sending a string at certain coordinates (y=row / x=column).

Code:
Dim autECLPSObj As Object
autECLPSObj = CreateObject ("PCOMM.autECLPS")
autECLPSObj.SetConnectionByName("A")
outputstring = autECLPSObj.GetText(y,x,zeichen)

This code gives me an error:

Internal : Could not execute code stage because exception thrown by code stage: ECL37170: Ungültige Parameter. Ungültige Daten.


Code:
Dim autECLPSObj As Object
autECLPSObj = CreateObject ("PCOMM.autECLPS")
autECLPSObj.SetConnectionByName("A")
outputstring = autECLPSObj.GetText(1,2,4)

If I hardcode the values ( 1 , 2 , 4 )its working as intended and returns me a string 4 characters long from the coordinates row 1 column 2


Hi Matuopm,

try bellow Code may be it will work for you..

Dim autECLPSObj As Object

autECLPSObj = CreateObject("PCOmm.autECLPS")
autECLPSObj.SetConnectionByName(A" )

outputstring =autECLPSObj.Get Text(Convert.ToInt32(y), Convert.ToInt32(x), Convert.ToInt32(zeichen))
 

matuopm

Member
Convert.ToInt32 is a really good hint.
I found another solution in the meanwhile but I'm sure I can use your advice in the future.

Thank you !
 
Top